Get data from MySQL Database in Spring Boot | Java

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 52

  • @roshnimandarapu5097
    @roshnimandarapu5097 Месяц назад +1

    Thanks a lot! God bless you.

  • @shubhamgaikwad6278
    @shubhamgaikwad6278 Год назад +1

    Very helpful tutorial, finally I was able to fetch data from my database. Thank you so much

    • @thelearningmighty
      @thelearningmighty  Год назад +2

      Welcome.... I will be conducting a Java Fullstack Development training for 21 days. If you have time please do join.

    • @Nikhil_Nomad
      @Nikhil_Nomad Год назад +1

      Bro where is this 21 days training course available?

    • @thelearningmighty
      @thelearningmighty  Год назад

      @@Nikhil_Nomad I will update regarding this Tomorrow.

  • @akashsalunke1813
    @akashsalunke1813 Год назад +1

    Cannot invoke "java.sql.Connection.prepareStatement(String)" because "this.connection" is null

    • @thelearningmighty
      @thelearningmighty  Год назад

      Which means connection is not established and check the driver name. .cj

  • @shaikmdraffi88
    @shaikmdraffi88 Год назад

    about half an hour I got this error "Thread starvation or clock leap detected (housekeeper delta=3m25s887ms815µs600ns)." after running my project.

  • @ajeyaranga
    @ajeyaranga Год назад +1

    How can I get data from multiple table ???
    Suppose instead of a select statement , I want to run an SP which returns 3 tables. How can I store the values from all 3 tables ??
    Kindly help.

    • @thelearningmighty
      @thelearningmighty  Год назад

      Very simple,
      1. Join 3 tables by writing a query
      2. What all the feilds you are trying to fetch from the query with those parameters create a model in Model package.
      3. What ever the data result you get from your query store this data in Object of new model class.
      4. Save this object in the list and return that list.
      As simply as that

    • @ajeyaranga
      @ajeyaranga Год назад +1

      @@thelearningmighty
      Hi thanks for the reply.
      1. I have already created the inner join query ( stored procedure )
      2. Created modals for each table value . IE 3 models. One for each
      3. Created one model which contains all other models.
      4. How to store all table values to one list ?? How can I contain all models ?

    • @thelearningmighty
      @thelearningmighty  Год назад

      @@ajeyaranga it's simple, you know what all parameters or columns values will come from your query right. Next with same column names create a model(class) in model package. What ever the data u get from table store it in a object of that newly create class or model and store the object inside a list.

  • @shaikmdraffi88
    @shaikmdraffi88 Год назад +1

    I am very new to spring boot why we are used "/employees" lastly.

    • @thelearningmighty
      @thelearningmighty  Год назад

      /employees is the API which we created and this will be a end point to fetch the data of a employess

  • @yashika1842
    @yashika1842 Год назад +1

    Nice

  • @shaikmdraffi88
    @shaikmdraffi88 Год назад

    my spring boot project also successfully started but the web page shows nothing.there are no warnings even the web page doesn't shows any table data of my database MYSQL.
    how can I resolve it.

  • @shaikmdraffi88
    @shaikmdraffi88 Год назад

    Still I am getting empty results.

  • @_xenomorph8096
    @_xenomorph8096 2 года назад +1

    Amazing

    • @thelearningmighty
      @thelearningmighty  2 года назад +2

      Thank You so much

    • @シャム-d3n
      @シャム-d3n 2 года назад

      @@thelearningmighty can also do a video showcasing get and post using jpa repository where we dont need to write these queries in service implementation class?, explanation was very neet ty

    • @thelearningmighty
      @thelearningmighty  2 года назад

      Sure I will try to make a video as soon as Possible. Thank You

  • @MrMii-pj9uq
    @MrMii-pj9uq Год назад +1

    Haven't you used Jpa? As i can see you haven't made use of Jpa repository. what is dbUtil actually?

    • @thelearningmighty
      @thelearningmighty  Год назад

      Db util for database connection.

    • @MrMii-pj9uq
      @MrMii-pj9uq Год назад

      Sir Im getting "This application has no explicit mapping for /error, so you are seeing this as a fallback.(type=Not Found, status=404)." error. controller looks completely fine. would you please help? 😢

    • @thelearningmighty
      @thelearningmighty  Год назад

      @@MrMii-pj9uq Please share the error screen shot and controller file and pom.xml file to quickproject131@gmail.com. I will check and let you know

  • @56_aiml2_avanish_tiwari4
    @56_aiml2_avanish_tiwari4 Год назад

    data is not showing i have used postgresql for database pls reply

  • @nikhileshsharma5681
    @nikhileshsharma5681 Год назад

    sir, i got "HTTP Status 404 - Not Found" error pls resolve my issue sir 🙏🙏🙏🙏🙏🙏

  • @mohammadibegum7050
    @mohammadibegum7050 Год назад

    When I m selecting the maven project I'm not getting the pom.xml file

  • @nalladimmukalyan5475
    @nalladimmukalyan5475 Год назад +1

    Thats impressive! Thank you for the tutorial. What if I have dynamic table. I am trying to find the solution to fetch data from a database which is throws a columns dynamically, Could you able to help me on it. Thank you

  • @Mahesh-co9it
    @Mahesh-co9it Год назад

    sir,the code is executed successfully in eclipse when i'm trying to fetch from browser by entering localhost:8080/employees
    it shows whitelabel error andshowing This application has no explicit mapping for /error, so you are seeing this as a fallback.
    404 error how to resolve this

  • @harrishpaul7374
    @harrishpaul7374 Год назад

    sir how to convert into pdf format

  • @user-nf1vz9ez7q
    @user-nf1vz9ez7q Год назад

    I’m getting Whitelable Error Page

    • @thelearningmighty
      @thelearningmighty  Год назад

      WhiteLable error means the API which you are calling is wrong .... Please check Controller once

    • @lnoorplaylist
      @lnoorplaylist Год назад +1

      @@thelearningmighty I'm also getting this error and it's not going away😢😢

    • @thelearningmighty
      @thelearningmighty  Год назад

      @@lnoorplaylist Could you please mail the controller code and error screenshot which you are getting in the browser while accessing. Mail Id : quickproject131@gmail.com

    • @chillylilly7247
      @chillylilly7247 Год назад

      @@thelearningmighty Same Error . Mailed You !...Kindly Check out!!!ASAP!!!

    • @yogeshborhade5533
      @yogeshborhade5533 Год назад +1

      Check the url you have passed in the @GetMapping and then again run your application.