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.
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
@@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 ?
@@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.
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.
@@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
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? 😢
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
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
@@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
Thanks a lot! God bless you.
@@roshnimandarapu5097 Thank you ☺️
Very helpful tutorial, finally I was able to fetch data from my database. Thank you so much
Welcome.... I will be conducting a Java Fullstack Development training for 21 days. If you have time please do join.
Bro where is this 21 days training course available?
@@Nikhil_Nomad I will update regarding this Tomorrow.
Cannot invoke "java.sql.Connection.prepareStatement(String)" because "this.connection" is null
Which means connection is not established and check the driver name. .cj
about half an hour I got this error "Thread starvation or clock leap detected (housekeeper delta=3m25s887ms815µs600ns)." after running my project.
Could you please share the error screenshot via mail ?
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.
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
@@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 ?
@@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.
I am very new to spring boot why we are used "/employees" lastly.
/employees is the API which we created and this will be a end point to fetch the data of a employess
Nice
Thanks for the comment. Please do subscribe
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.
Is the controller file code is correct?
Still I am getting empty results.
Amazing
Thank You so much
@@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
Sure I will try to make a video as soon as Possible. Thank You
Haven't you used Jpa? As i can see you haven't made use of Jpa repository. what is dbUtil actually?
Db util for database connection.
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? 😢
@@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
data is not showing i have used postgresql for database pls reply
Could you please elaborate
sir, i got "HTTP Status 404 - Not Found" error pls resolve my issue sir 🙏🙏🙏🙏🙏🙏
Check the Api name which you gave in controller file
When I m selecting the maven project I'm not getting the pom.xml file
I guess it's been downloaded properly
Please check once again
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
Sure why not
@@thelearningmighty I have reaached you through email,please check
@@nalladimmukalyan5475 Sure let me check
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
check Controller
check controller file
sir how to convert into pdf format
I dint get. Please tell what to convert ?
I’m getting Whitelable Error Page
WhiteLable error means the API which you are calling is wrong .... Please check Controller once
@@thelearningmighty I'm also getting this error and it's not going away😢😢
@@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
@@thelearningmighty Same Error . Mailed You !...Kindly Check out!!!ASAP!!!
Check the url you have passed in the @GetMapping and then again run your application.