POST data in Mysql database using Spring Boot and Postman tutorial | REST API

Sdílet
Vložit
  • čas přidán 24. 01. 2023
  • How to perform post operation to input data into mysql database in rest api using spring boot and postman is shown
    #restapi #mysql #springboot
  • Věda a technologie

Komentáře • 73

  • @mohomedrimzan8916
    @mohomedrimzan8916 Před 2 měsíci

    Was going through so many tutorials but yet this was the successful one. Great One!!!

  • @anithkumar1524
    @anithkumar1524 Před rokem +1

    Thank you very much Brother, i m new to this coding, So Your videos would have helped me a lot to understand simply, Really appreciate your efforts🤩👍

  • @erenyeager45god
    @erenyeager45god Před 4 měsíci

    Your doing a good job and Straight to the point. 🎉 And thats a "PascalCase" Not a "camelCase".❤

  • @jayaprakash1546
    @jayaprakash1546 Před rokem

    Thank you for tutorial

  • @deeyt7573
    @deeyt7573 Před měsícem

    Simple & works fine

  • @GnanaPonneri
    @GnanaPonneri Před 3 měsíci

    good Explanation

  • @josephrexa5444
    @josephrexa5444 Před 5 měsíci

    Simply It works

  • @user-ii6rb6nw8c
    @user-ii6rb6nw8c Před 11 měsíci

    thank men

  • @telugudramaworld8021
    @telugudramaworld8021 Před 11 měsíci

    DO we need to write the MySQL code in prior or not needed, pls help here - The one with creating newDB and all in MySQL

    • @unitedtoptech6288
      @unitedtoptech6288  Před 11 měsíci

      Yeah you need to create the database first using mysql code prior

  • @user-jm5ov9gx1v
    @user-jm5ov9gx1v Před rokem +1

    Application runs fine but im not getting response in the postman, though the status is 200ok. this is my post request {
    "marks":100,
    "name":"Penny"
    }
    its my response: {}
    null values with random id are getting inserted into database. whats wrong? any idea!

    • @user-jm5ov9gx1v
      @user-jm5ov9gx1v Před rokem

      Hibernate: select next_val as id_val from students_db_seq for update
      Hibernate: update students_db_seq set next_val= ? where next_val=?
      Hibernate: insert into students_db (st_marks,st_name,id) values (?,?,?)

    • @unitedtoptech6288
      @unitedtoptech6288  Před rokem

      Where are you passing the id? I see u have mark , name and id columns

    • @mr.khiladi6796
      @mr.khiladi6796 Před 9 měsíci

      I am having the same problem, please somebody help us.

    • @mr.khiladi6796
      @mr.khiladi6796 Před 9 měsíci

      @@user-jm5ov9gx1v did you get your problem solved ? if yes, please help me also.

    • @charubabbar8807
      @charubabbar8807 Před 8 měsíci

      have your problem solved. I am getting same error.

  • @user-qk2ph7jl1r
    @user-qk2ph7jl1r Před 11 měsíci

    I didnt understand how you created the postman. Like how can you please tell? its not mentioned in the video

    • @unitedtoptech6288
      @unitedtoptech6288  Před 11 měsíci

      just click on create new workspace option, the one with the plus icon

  • @Strawhat-lu7ib
    @Strawhat-lu7ib Před 8 měsíci

    When iam posting json body one of the data is being stored as null in database

    • @unitedtoptech6288
      @unitedtoptech6288  Před 8 měsíci

      Check if you have the type as json in postman and if you are using express.json() in code

  • @user-zv4lv7lg4l
    @user-zv4lv7lg4l Před rokem

    Hi! thanks for the video, very helpfull.
    when using postman,I am getting a 500 error, seems like a problem with data base... because if Iam just returning a string there is not an error and if trying update data base - error. if someone knows what can i do

  • @NikitaLazaroSevcisen
    @NikitaLazaroSevcisen Před 4 měsíci

    do you have this on some github repository??

  • @siddhishinde8027
    @siddhishinde8027 Před 3 měsíci

    Thank you sir, i have problem after the post and get my data is not reflecting in mysql workbench , please help me

    • @unitedtoptech6288
      @unitedtoptech6288  Před 3 měsíci

      What do you get as response? any errors?

    • @siddhishinde8027
      @siddhishinde8027 Před 3 měsíci

      @@unitedtoptech6288 no errors sir

    • @siddhishinde8027
      @siddhishinde8027 Před 3 měsíci

      @@unitedtoptech6288 no errors postman sending the request and the table is also created in mysql work bench only the data is not getting fetched

    • @unitedtoptech6288
      @unitedtoptech6288  Před 3 měsíci

      is it fetch all data or fetch by using an id alone?

    • @siddhishinde8027
      @siddhishinde8027 Před 3 měsíci

      @@unitedtoptech6288 am providing only first name, last name and email the id is automatically generated (employee management system)

  • @_KrishnaMoorthyR
    @_KrishnaMoorthyR Před 9 měsíci

    Sir I send request post and getting output as empty object

  • @shreyamarya3452
    @shreyamarya3452 Před 3 měsíci

    how to delete the data from Querry through this program

  • @gulshankataria77
    @gulshankataria77 Před rokem +1

    I am getting MySQL8 dialect has been deprecated..could you please help ?

    • @unitedtoptech6288
      @unitedtoptech6288  Před rokem

      I just did this last week, I didn't get any such things, did you select the java version same as me?

    • @manojprabhakar5286
      @manojprabhakar5286 Před rokem

      @@unitedtoptech6288 how can we insert multiple records in to mysql through postman by using nodejs can you please do a video sir

    • @unitedtoptech6288
      @unitedtoptech6288  Před 6 měsíci

      yep I did , you can send list of objects for that from postman

  • @rajeshkhannaarumugam6699

    will it work with maven

  • @mamtakurrey6405
    @mamtakurrey6405 Před rokem

    I didn't get table in MySQL

  • @clarkkent3004
    @clarkkent3004 Před 25 dny

    W

  • @charubabbar8807
    @charubabbar8807 Před 8 měsíci

    Hi Through postman I am getting response empty { } and rows are inserting in db as :
    +----+---------+------+
    | id | st_mark | name |
    +----+---------+------+
    | 1 | 0 | NULL |
    +----+---------+------+
    Please help! Thanks in advance

    • @unitedtoptech6288
      @unitedtoptech6288  Před 8 měsíci

      Are you sending response in code , that res send() thing ?

  • @numzikshiuaxing1600
    @numzikshiuaxing1600 Před 3 měsíci

    As you didn't mention anything about postman,could you please tell me regarding what i should do in postman?I have to idea what url should I type or the localhost.

    • @unitedtoptech6288
      @unitedtoptech6288  Před 3 měsíci

      Just type the same URL as I have done in postman, It is just a tool for making API calls, please learn about it first

    • @numzikshiuaxing1600
      @numzikshiuaxing1600 Před 3 měsíci

      @@unitedtoptech6288 Error: connect ECONNREFUSED 127.0.0.1:3000
      Request Headers
      Content-Type: application/json
      User-Agent: PostmanRuntime/7.37.3
      Accept: */*
      Postman-Token: be86e12b-13d6-4992-a219-ffec31712fba
      Host: localhost:3000
      Accept-Encoding: gzip, deflate, br
      Connection: keep-alive I get this when I click send after typing the url.

    • @unitedtoptech6288
      @unitedtoptech6288  Před 3 měsíci

      Is your spring boot application running on port 3000?

    • @numzikshiuaxing1600
      @numzikshiuaxing1600 Před 3 měsíci

      @@unitedtoptech6288 yeahh...I figured it out..thank you!

    • @unitedtoptech6288
      @unitedtoptech6288  Před 3 měsíci

      Was that the issue?

  • @ArthurCnap
    @ArthurCnap Před 5 měsíci

    Hi, im having a problem with starting an application it throws:
    "Field studentRepository in com.project.ToDoList.Service.StudentService required a bean of type 'com.project.ToDoList.Repository.StudentRepository' that could not be found."
    Thought it might happen because there's no @Repository annotation but adding it didn't help.
    Also the informations about creating the table in run console do not appear, i have
    spring.jpa.show-sql=true and spring.jpa.generate-ddl=true in my aplication properties

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      Please check if you have added autowired annotation to repository and service object variables

    • @ArthurCnap
      @ArthurCnap Před 5 měsíci

      @@unitedtoptech6288 I figured it out, guess there was a problem with MySQL Driver cause I was working on a project generated a few days ago. I took some random dependency from maven repo and that created all the problems. Thank you for the response mate

    • @unitedtoptech6288
      @unitedtoptech6288  Před 5 měsíci

      ohh glad it woked for you now! welcome