Thanks! Adding for self reference. 9:19 - dependencies, 13:07 - pom.xml 17:58 - Product.java code 24:49 - instance of product repository in the product service. So the service interacts with the repo. 32:09 - returns empty. 35:29 - perform all these 37:23 - @GetMapping, feching form apis, locally (postman) 48:21 - http methods
@@CodeJava Glad that its helpful. I have a doubt. So I purchased the udemy course for E cart app project, but I'm not able to clone it from GitHub, can someone guide me how to do this?.
You video tutorial is very good. You've the talent to teach. This is the most straightforward beginner-level Spring Boot REST CRUD walkthrough I've ever watched. A Spring beginner can learn the basics from you without being confused by unnecessary details. Still there a couple of things I think you can improve: First, I think it is a better practice to create several packages so that the project structure looks more organized; second, with regard to the PUT method, you can write one {id} in the URI and a different "id" in JSON but it still works, as long as the URI {id} exists in mydb. I think a beginner should be aware of these two points.
Thank you my brother for uploading this. i need to implement web service using spring and hibernate for an upcoming project at work.. and the RequestEntity portion was really confusing me. This video really cleared it up. Thanks a ton brother. I have subscribed and I hope your channel grows from strength to strength.
Dude that is absolute amazing 🤩 and awesome 😎. So you can programming a fully json server service app and in the other hand a mobile app for the view! Incredible really! Thanks I have a lot of ideas 💡 now. You are the ounce of the best framework teacher ever! Great eastern Dude! God bless you. 🖖🏻🖖🏻🖖🏻🖖🏻
Hi, Thanks a lot for the videos you make, they are really helpful..! I got an error while working on this which says Unsatisfieddependencyexception:error creating bean with name ..Contoller, Could you please help me with it
@@CodeJava If you had the time maybe you could make one on signup/login with user roles? Your videos are definitely the best I have come across. Thanks very much
Everything is working fine but only in PUT and POST , I am getting error as port number ended with "" and also port number out of range error,is there anything that we can do to rectify this error? It will be very helpful!
Chào bạn, Cảm ơn bạn về những chia sẻ rất hay và bổ ích cho cộng đồng! Tiện đây mình xin phép nhờ bạn tư vấn giúp mình 1 vấn đề. Mình có 1 cơ sở dữ liệu mysql, trong đó có nhiều table ( hàng trăm) có cấu trúc giống nhau, vậy bắt buộc mình phải tạo code trong Model cho từng table đó, hay có cách nào để mình chỉ cần tạo 1 class trong model, khi CRUD chỉ cần truyền tên table thôi. Cảm ơn bạn!
What a great tutorial. Easy to understand and follow along. Keep up the good work. I subscribed to your channel in case you upload more content. Thank you for uploading this video.
hi when try to view values by id i get an error . but i follow the every steps."Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Mar 10 01:19:53 IST 2021 There was an unexpected error (type=Not Found, status=404)."
Hello! cảm ơn bạn again... by the way, I have used your code for my own table -- works well! One comment though, if a table column name uses camel case (eg FirstName)... it errors out. I renamed my table column names to have all lower case and it works.... but do you know any solution through code?
then you can use the @Query annotation in the repository interface. Check this tutorial which contains an example of a custom query: www.codejava.net/frameworks/spring-boot/spring-boot-spring-data-jpa-mysql-example
@@CodeJava Got it.Thank you..one more doubt...is this is a general procedure to make connection to sql ..should we must create an interface and service class...is that mandatory?
so just add a new column of type DATETIME into the products table. In the service class, set createdAt to the current date and time (users do not have to specify this value).
@@CodeJava Hello sir, everything's good, but I was now proposed to do orders ! Do you have anything related to that ? An Order needs to have an email associated ( No login needed ), the products and the total price... i need some help
When iam use same code which you have shown in your application iam getting error Like "There was an unexpected error(type=Internal Server Error, status=500)
I think you passed the existProduct on PutMapping save() method you need to pass the product from the request body. I solved with this. I hope this helps
in Android app, you should make AJAX call to the RESTful webservices. Check this thread on Stackoverflow: stackoverflow.com/questions/34762273/android-ajax-in-java
Hey , I am getting 500 server error after hitting /products API , Its giving error as " This application has no explicit mapping for /error, so you are seeing this as a fallback. Tue Apr 06 18:37:41 IST 2021 There was an unexpected error (type=Internal Server Error, status=500)." what could be the possible issue.
@@CodeJava I got the issue , the db table should be "product" and the table i created was "products". Thanks @Code Java for this outstanding tutorial , 🔥
@@granthsaar4808 check the detailed error in console . It has the answer to most of the problems , and you will be able to fix by urself . You can paste your stack trace here as well .
oh, sorry to hear that. Follow the written tutorial instead: www.codejava.net/frameworks/spring-boot/spring-boot-restful-crud-api-examples-with-mysql-database
Thanks! Adding for self reference.
9:19 - dependencies,
13:07 - pom.xml
17:58 - Product.java code
24:49 - instance of product repository in the product service.
So the service interacts with the repo.
32:09 - returns empty.
35:29 - perform all these
37:23 - @GetMapping, feching form apis, locally (postman)
48:21 - http methods
thanks for making these useful bookmarks.
@@CodeJava Glad that its helpful.
I have a doubt. So I purchased the udemy course for E cart app project, but I'm not able to clone it from GitHub, can someone guide me how to do this?.
You video tutorial is very good. You've the talent to teach. This is the most straightforward beginner-level Spring Boot REST CRUD walkthrough I've ever watched. A Spring beginner can learn the basics from you without being confused by unnecessary details. Still there a couple of things I think you can improve: First, I think it is a better practice to create several packages so that the project structure looks more organized; second, with regard to the PUT method, you can write one {id} in the URI and a different "id" in JSON but it still works, as long as the URI {id} exists in mydb. I think a beginner should be aware of these two points.
Thanks for your valuable feedback. I have plan to make a brand new video for this kind of tutorial. So stay tuned.
Thank you my brother for uploading this. i need to implement web service using spring and hibernate for an upcoming project at work.. and the RequestEntity portion was really confusing me. This video really cleared it up. Thanks a ton brother.
I have subscribed and I hope your channel grows from strength to strength.
Glad it helped. And thanks for the sub :)
I've acquired few tricks to add to my spring boot knowledge ! thank you
Happy to help!
Dude that is absolute amazing 🤩 and awesome 😎. So you can programming a fully json server service app and in the other hand a mobile app for the view! Incredible really! Thanks I have a lot of ideas 💡 now. You are the ounce of the best framework teacher ever! Great eastern Dude! God bless you. 🖖🏻🖖🏻🖖🏻🖖🏻
You're welcome. Glad you liked this video. Kindly come often.
gracias tu video es muy claro
you're welcome :)
Wonderful work. Thanks a lot. All material made with quality.
So nice of you. Thanks for watching!
@@CodeJava Only in application should be spring.jpa.hibernate.ddl-auto=update otherwize hibernate can't create system table for his work.
Very helpful, liked and suscribed!
Thanks for the sub!
I use java 11 and maven 2.4.2 and it works!!
Glad to know that. Have you checked my full playlist for Spring Boot here? ua-cam.com/video/B4IDlfT-53I/v-deo.html
Thank you man. Good job.
Glad it helped
Thank You, this tutorial helped me a lot! I did not skip the ads to support you! :)
You're great. Thank you too!
thanks a lot. It's very helpful for me! Have a nice day
Glad it helped!
Thank you Its very helpful and worked nicely on my demo crud project
Glad it helped!
Amazing... much better content than the channels with more than 500k subscribers...
Thank you. Glad you found it helpful :)
Hi, Thanks a lot for the videos you make, they are really helpful..! I got an error while working on this which says Unsatisfieddependencyexception:error creating bean with name ..Contoller, Could you please help me with it
great video, exactly what I was looking for!
Glad you liked it!
It was really so so useful! Such a clear teaching.Hats off to you!!
Glad it was helpful!
well planned tutorial for beginners. Thanks
Glad it was helpful!
Your videos are brilliant!!!!
Wow, thank you!
@@CodeJava If you had the time maybe you could make one on signup/login with user roles? Your videos are definitely the best I have come across. Thanks very much
@@keithnolan8238 check this video: ua-cam.com/video/aRLoSDOlU3w/v-deo.html
and this one: ua-cam.com/video/p18O0hSmQyM/v-deo.html
Thank you much it works for me.
Glad it helped
Just incredible 😍
thank you, glad you liked it.
@@CodeJava ✅
Amazing video...Really well explained
Glad it was helpful!
Your video was very helpful
Glad it was helpful!
Everything is working fine but only in PUT and POST , I am getting error as port number ended with "" and also port number out of range error,is there anything that we can do to rectify this error? It will be very helpful!
I am getting this error in curl
It helped me alot. Please provide such lesson with springboot security. It would be really helpful alot.
Glad it helped. You can watch my playlist for Spring Boot Security here: ua-cam.com/video/d9t_trawaa0/v-deo.html
God Job man!, Greetings from Colombia.
Thank u. Very helpful video
Glad it was helpful!
Great videos
Thanks!
Wow. Great Tutorial. Subscribed😀
Thanks for the sub!
I am getting a HTTP Status 500 - Internal Server Error while trying to run on the browser or in the command prompt. How to fix it?
Super super sir thanks
Welcome
Thank you very much 🙏
You're most welcome. Check my playlist for Spring Boot tutorials here: ua-cam.com/video/B4IDlfT-53I/v-deo.html
Yu are going great job bro during this hard time
Thanks a ton
if ID auto generation doesn't work with you,
Check application.properties file.
make sure that spring.jpa.hibernate.ddl-auto = update
Thanks
You're welcome. Glad it helped. And thanks for your $uper Thanks.
Thank You
You're welcome
Pls help me...am getting curl: no url specified in video at 46:52
Chào bạn, Cảm ơn bạn về những chia sẻ rất hay và bổ ích cho cộng đồng!
Tiện đây mình xin phép nhờ bạn tư vấn giúp mình 1 vấn đề.
Mình có 1 cơ sở dữ liệu mysql, trong đó có nhiều table ( hàng trăm) có cấu trúc giống nhau, vậy bắt buộc mình phải tạo code trong Model cho từng table đó, hay có cách nào để mình chỉ cần tạo 1 class trong model, khi CRUD chỉ cần truyền tên table thôi.
Cảm ơn bạn!
nếu có cấu trúc giống nhau thì tại sao ko gom vào 1 table cho đơn giản? nếu như vậy thì database design chưa tối ưu.
@@CodeJava Mình muốn tách ra vì nếu gộp lại 1 bảng thì số bản ghi sẽ rất nhiều, tốn nhiều thời gian để truy vấn và tính toán.
@@nguyenngochung6625 bao nhiêu bản ghi vậy bản? bạn có dùng index để tối ưu truy vấn ko?
@@CodeJava Dữ liệu khoảng 10 triệu bản ghi bạn.
với CSDL và máy tính ngày nay thì 10tr record ko phải là nhiều. Bạn cần tối ưu thiết kế.
nice video, but i have a question,
how do we work with api that the object has a array in it?
No issues at all. Just declare an array in the mapping class.
@@CodeJava okay then how do we working on the database, i tried before there is parsing problem when declare my attributes as a string array
Can postman be used in place of curl
Sure, Postman provides easy-to-use GUI.
How to render the rest api in the browser using thymeleaf?
I think that's not a good idea. Thymeleaf renders the view directly from controller and model, not via Rest API.
20:13 What's use of @id?? Why do it needed?? It's gonna work as same if not mentioned too.. then why??
It marks the field mapping to a primary column in the database.
Except getting list All are errors bro (url is bad/illegal not specified) pls give suggestions to solve this error brother
Thanks, this was very very helpful!
You're welcome!
@@CodeJava you tired to explain well. Thank you so much
@@brendamoragwa2474 you're welcome.
sử dụng restcontroller với thymeleaf để up lên html như thế nào vậy anh
anh chưa hiểu ý em là như thế nào?
@@CodeJava em chưa hiểu làm thế nào để RestController trả data về html
thường RestController chỉ trả về JSON thôi em ạ. HTML thì em dùng Spring MVC controller bình thường.
@@CodeJava thanks anh :)
What a great tutorial. Easy to understand and follow along. Keep up the good work. I subscribed to your channel in case you upload more content. Thank you for uploading this video.
Thanks for the sub! Kindly check my full playlist for Spring Boot here: ua-cam.com/video/B4IDlfT-53I/v-deo.html
I guess I'm kinda randomly asking but does anybody know a good site to watch newly released movies online?
hi when try to view values by id i get an error . but i follow the every steps."Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Mar 10 01:19:53 IST 2021
There was an unexpected error (type=Not Found, status=404)."
ensure that you typed the URL correctly (no typos) and check the URL mapping.
Hello! cảm ơn bạn again... by the way, I have used your code for my own table -- works well! One comment though, if a table column name uses camel case (eg FirstName)... it errors out. I renamed my table column names to have all lower case and it works.... but do you know any solution through code?
the best practice is using underscores instead of camel case to avoid potential issues.
Superb
Thank you :)
What if i want design with customized SQL query . I dont see where your SQLs are defined ?
then you can use the @Query annotation in the repository interface. Check this tutorial which contains an example of a custom query: www.codejava.net/frameworks/spring-boot/spring-boot-spring-data-jpa-mysql-example
I got the error like cannot convert from Optional to Product when using get by Id operation...could you help to fix it...Thanks in advance
You need to call get() from the Optional object: Product p = optional.get()
@@CodeJava Got it.Thank you..one more doubt...is this is a general procedure to make connection to sql ..should we must create an interface and service class...is that mandatory?
@@gokulv1165 yes, that's the best practice
I need help, I need a created_at attribute that tells me when I created a certain product !!
so just add a new column of type DATETIME into the products table. In the service class, set createdAt to the current date and time (users do not have to specify this value).
@@CodeJava Hello sir, everything's good, but I was now proposed to do orders ! Do you have anything related to that ? An Order needs to have an email associated ( No login needed ), the products and the total price... i need some help
Super bro ...
thanks
How to consume the api ? And then use it to build our complete web?
and how to build one too? That would be good too :)
@@sediqkhan8353 yes, JSON to HTML table in the simplest way!
How @CraftMojo
When iam use same code which you have shown in your application iam getting error
Like
"There was an unexpected error(type=Internal Server Error, status=500)
please post the detailed exception which contains the root cause.
I think you passed the existProduct on PutMapping save() method you need to pass the product from the request body. I solved with this. I hope this helps
awesome job , thanks a lot
Glad it helped. You can also learn my full series for Spring Boot here: ua-cam.com/video/B4IDlfT-53I/v-deo.html
hi. i want to connect spring boot rest api to androd studio . but i can't find any tutorial for it
in Android app, you should make AJAX call to the RESTful webservices. Check this thread on Stackoverflow: stackoverflow.com/questions/34762273/android-ajax-in-java
@@CodeJava thank you so much for your supporting
Spring Boot hibernate Validator not working ...what to do???
kindly tell me the error in details
Hey , I am getting 500 server error after hitting /products API , Its giving error as " This application has no explicit mapping for /error, so you are seeing this as a fallback.
Tue Apr 06 18:37:41 IST 2021
There was an unexpected error (type=Internal Server Error, status=500)." what could be the possible issue.
See the console for the actual error (internal server error).
@@CodeJava I got the issue , the db table should be "product" and the table i created was "products".
Thanks @Code Java for this outstanding tutorial , 🔥
@@vivekwarjurkar6452 glad you fixed it.
I got the same error can you please help i havent made mistake in table name as i checked ...
@@granthsaar4808 check the detailed error in console .
It has the answer to most of the problems , and you will be able to fix by urself .
You can paste your stack trace here as well .
Hello, make video for how to save and fetch images from mysql database using spring mvc, could you help me in that case
I will publish a video like that. Thanks for your great suggestion. Kindly be patient.
@@CodeJava really need this type of video
You can use Spring tool suit
Got jdbc driver error couldn't move forward
what is the error in details?
Thank you !
You're welcome! Come back to see my channel more often as I publish videos regularly.
hi sir Spring Boot RESTful web services APIs application video post please
Nam, increase the editor font.Thanks a lot for the video
Font size was increased. Isn't it enough for you?
Unknown column 'societa_so0_.id_societa_solonari' in 'field list' -RIP
solved: spring.jpa.hibernate.ddl-auto=update in application.properties
Sound needs improvement. Contents are good.
Thanks, I will.
thanks
You're welcome!
Pls help me out ASAP
tell me what your issue is, in details.
insightful video bad sound
thanks for watching anyway.
subscriber + 1 :)
are you VietNamese ?
yes, I am.
@@CodeJava I'm VietNamese, too. I learned a lots from you. Thank you so much. Where are you at Viet Nam ?
@@HaiHai-xg4ip good morning from Da Nang city
hi man
your voice is not to teach instead it is a best way to sleep.
oh, sorry to hear that. Follow the written tutorial instead: www.codejava.net/frameworks/spring-boot/spring-boot-restful-crud-api-examples-with-mysql-database
Thank u so much now I can study because your content is very good.
I dont know why I got this Not a managed type: class com.apolis.main.Product even though I follow your structure. put everything in same main package
check the package of the main class. Also follow this video: ua-cam.com/video/ug53epaPFrA/v-deo.html
Thank you so much 🙏
You're welcome 😊