Spring Boot, MySQL, JPA, Hibernate Restful CRUD API Tutorial

  Рет қаралды 78,392

Java Guides

Java Guides

4 жыл бұрын

In this video tutorial, we’ll build a Restful CRUD API for a simple user management application. We’ll first build the APIs to create, retrieve, update and delete a user, and then test them using postman.
GitHub link at github.com/RameshMF/springboo....
Read the blog post at www.javaguides.net/2020/04/sp....
#springboot #hibernate #javaguides
Java Guides Website: www.javaguides.net/
About me: www.javaguides.net/p/about-me...
Subscribe to our KZbin channel at / javaguides
Java 8 Tutorials - • Java 8 Tutorials
Spring Boot Tutorials - • Spring Boot Tutorial
Java Tutorials - • Java Tutorials
Java Best Practices - • Java Best Practices
Design Patterns in Java - • Design Patterns in Java
Servlet JSP Tutorials - • Servlet JSP Tutorials
Spring MVC Tutorials - • Spring MVC Tutorial
Hibernate 5 Tutorials - • Hibernate 5 Tutorial
MongoDB Tutorials - • MongoDB Tutorial

Пікірлер: 93
@JavaGuides
@JavaGuides 4 жыл бұрын
Spring Boot REST API Exception Handling at kzbin.info/www/bejne/rojRhmmuaqerr6M Spring Boot Rest API Validation with Hibernate Validator at kzbin.info/www/bejne/ppukaoOZbMaHn8U
@vishalakshin1840
@vishalakshin1840 4 жыл бұрын
I am a beginner of spring boot, Please arrange the playlist from basics and topic wise so that we can follow the playlist.
@JavaGuides
@JavaGuides 4 жыл бұрын
@@vishalakshin1840 please check spring boot for beginners playlist on my youtube channel. It has ordered videos and I made it for spring boot beginners.
@igoerche
@igoerche Жыл бұрын
Mister! I started several weeks ago with your tutorials and now want to thank you from the bottom of my heart for all your help! Its so great to have you! Thank you very very much!
@randhirverma8042
@randhirverma8042 4 жыл бұрын
hey Ramesh, Thanks for this video, I have waited long for this
@SureshBabu-jq9su
@SureshBabu-jq9su 2 жыл бұрын
I am a beginner and was able to create rest API in first go itself. Great Explanation. Thank you so much
@wlodekkkr-refactoring
@wlodekkkr-refactoring 3 жыл бұрын
Very nice and very simple tutorial for beginners. Very well explained and easy to follow. Thank You!
@javatechnology4481
@javatechnology4481 4 жыл бұрын
Very nicely explained with great presentation. Very useful with lots of spring boot information.
@ramagarimidi
@ramagarimidi 4 жыл бұрын
Very helpful and useful. Thank you!
@ariannehernandez9680
@ariannehernandez9680 4 жыл бұрын
great tutorial! JPA is working.
@marciocostadeoliveira2271
@marciocostadeoliveira2271 3 жыл бұрын
Thanks, Java Guides!
@siamakd
@siamakd 3 жыл бұрын
Learning throught your training course is like finding a Gold ! You are genius man! Excelent Job!
@JavaGuides
@JavaGuides 3 жыл бұрын
Glad you enjoy it!
@jilanishaik8791
@jilanishaik8791 Жыл бұрын
Super explanation and Thank you so much ,Ramesh
@aanchalsathyanarayanan9223
@aanchalsathyanarayanan9223 4 жыл бұрын
Really useful video and the explanation was very clear which helped a lot! Its very helpful for any newbie like me! Thanks for this video.
@JavaGuides
@JavaGuides 4 жыл бұрын
I am glad that you found this video tutorial useful
@mahendranr8934
@mahendranr8934 2 жыл бұрын
👍Great work of knowledge sharing🙏
@mcskrishna
@mcskrishna 3 жыл бұрын
Very good. Thanks
@JITENDRAPAL21
@JITENDRAPAL21 3 жыл бұрын
Covered full CRUD in a nice way. Great !!!!!!!
@ayushkumarsone4401
@ayushkumarsone4401 3 жыл бұрын
{ "timestamp": "2021-05-19T13:04:08.834+00:00", "status": 404, "error": "Not Found", "message": "", "path": "/api/users/" } please help
@johndoedoejohn
@johndoedoejohn 3 жыл бұрын
@@ayushkumarsone4401 add this into application.properties file server.error.include-message=always _ Then check if message is passed into () -> new UserNotFoundExceotion(->here
@stephanihova808
@stephanihova808 4 жыл бұрын
Hi! Best video. I would like to know how to manage the pagination (previous and next) for the display of data. Thank you Java Guide!
@ChanoTSG
@ChanoTSG 3 жыл бұрын
you are the best.......
@prudhvialagola9677
@prudhvialagola9677 3 жыл бұрын
what a tutorial superrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
@koushikmaruvada5927
@koushikmaruvada5927 3 жыл бұрын
hey Ramesh, it was a neat and clean explanation even a beginner can understand, can you please explain the testing phase as well.
@thanos9704
@thanos9704 3 жыл бұрын
Best tutorial broooo
@tannubajpai4782
@tannubajpai4782 2 жыл бұрын
thnx u for for ur serives keep it up bro
@kishorkamlu392
@kishorkamlu392 4 жыл бұрын
Very good explanation. Thanks bro.
@JavaGuides
@JavaGuides 4 жыл бұрын
Thank you!
@denahornsby3043
@denahornsby3043 3 жыл бұрын
Thank you. Could you kindly say what you are clicking in the pop up boxes? Not sure how you were getting pop up boxes sometimes or what you were clicking. On the first page you can not see what was added as its up above the view. Maybe something like "Im going to click ...." for the auto loads would of been very helpful. With that this video is something I needed and I appreciate what you have done here. Just that one addition for the UI would of made it like so much easier to follow. Thank you.
@qamarislam274
@qamarislam274 3 жыл бұрын
Thanks for this nice tutorial. Those who are facing the issue of not getting error message from ResourceNotFound exception, just add the following line in your .properties file: server.error.include-message = always It is changed behavior in Spring Boot 2.3.0
@user-wy4el6zu1f
@user-wy4el6zu1f 3 жыл бұрын
Thank you! :)
@jamuna5181
@jamuna5181 3 жыл бұрын
Man you saved my time🎉, thank you!!
@ralphhuzz31
@ralphhuzz31 3 жыл бұрын
If your messages doesnt appear on the Exception just add this into application.properties file server.error.include-message=always
@raviravi-gg5ck
@raviravi-gg5ck 3 жыл бұрын
thank you so much!
@ascar66
@ascar66 3 жыл бұрын
Thank you Sir, everything is pretty clear
@someshsahu4638
@someshsahu4638 Жыл бұрын
very nice explanation sir thankyou so much 🙏🏼🙏🏼🙏🏼, i am your new subscriber, and i really loves your videos
@parthpatidar976
@parthpatidar976 Жыл бұрын
How to resolve this error?? { "timestamp": "2023-04-28T07:25:31.041+00:00", "status": 500, "error": "Internal Server Error", "message": "not-null property references a null or transient value : com.example.demo.model.Employee.firstname", "path": "/api/employees" here is the code: package com.example.demo.model; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.Table; @Entity @Table(name="employees") public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public long id; @Column(name = "first_name",nullable=false) public String firstname; @Column(name="last_name") public String lastname; @Column(name="email") public String email; public Employee(long id, String firstname, String lastname, String email) { super(); this.id = id; this.firstname = firstname; this.lastname = lastname; this.email = email; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } }
@sreedharbabu4969
@sreedharbabu4969 3 жыл бұрын
This really good. could you also provide sample spring batch example
@vishalakshin1840
@vishalakshin1840 4 жыл бұрын
Hi Ramesh, please arrange the playlist order in topic-wise as on the website.
@johndoedoejohn
@johndoedoejohn 3 жыл бұрын
Amazing video, thanks a lot Ramesh! :) @Everyone - Please leave thumbs ups after watching, guy is sharing this valuable knowledge for you so you can watch it for free.
@shivanishivu32
@shivanishivu32 3 жыл бұрын
Getting error mentioned below. Can you please help? com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
@hemanthcse1
@hemanthcse1 3 жыл бұрын
Hi i am getting this error while creating new user, can anyone help me out "error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: error performing isolated work" Thanks in advance
@shyamsoni5389
@shyamsoni5389 3 жыл бұрын
Extremly helpful videos. Can you make one video on O-auth google or facebook authentication with react js/ boot application ?
@bhaskarvallapu1285
@bhaskarvallapu1285 4 жыл бұрын
Iam getting first name and last name values inserted as null
@vyshnavivyshu4975
@vyshnavivyshu4975 Жыл бұрын
How to write if for id column as uuid type
@PrinceJeniFX
@PrinceJeniFX Жыл бұрын
please which app do you use for your screen recording ?
@JavaGuides
@JavaGuides Жыл бұрын
Camtesia
@vasilisnikolaou4633
@vasilisnikolaou4633 4 жыл бұрын
Great tutorial..but what about hateoas? I think it's one of the architectural constraints when building restful apis.
@JavaGuides
@JavaGuides 4 жыл бұрын
I will plan to create video tutorial on hateoas with continuation of this tutorial.
@raviravi-gg5ck
@raviravi-gg5ck 3 жыл бұрын
how to do bean validation
@manojhargude7192
@manojhargude7192 3 жыл бұрын
Parameter 0 of constructor in com.springboot.blog.security.CustomUserDetailsService required a bean of type 'com.springboot.blog.repository.UserRepository' that could not be found. The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true) Action: Consider defining a bean of type 'com.springboot.blog.repository.UserRepository' in your configuration. Can anyone help me with this bean configuration issue
@irckdwrld
@irckdwrld 3 жыл бұрын
Thanks for the nice tutorial. I've one doubt regarding why we are using spring.jpa.properties.hibernate.dialect property?
@JavaGuides
@JavaGuides 3 жыл бұрын
dialect property hibernate uses to identify the underlying database and generates the SQL queries.
@irckdwrld
@irckdwrld 3 жыл бұрын
@@JavaGuides Thank you so much for clarifying this quickly, you're the best :)
@SantoLucasST
@SantoLucasST 3 жыл бұрын
ok? great
@warehouseofhospitality
@warehouseofhospitality 3 жыл бұрын
private UserRepository userRepository; what is the grammer in Java?
@punamrupanavar6785
@punamrupanavar6785 3 жыл бұрын
I am getting Error while connecting to DB " java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)"
@JavaGuides
@JavaGuides 3 жыл бұрын
Configure database username and password as per your MySQL installation in application.properties file.
@victor8888
@victor8888 4 жыл бұрын
i have an error in console. im using gradle instead of mavan---- Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]
@victor8888
@victor8888 4 жыл бұрын
I got a response in postman { "timestamp": "2020-06-30T09:00:34.310+00:00", "status": 405, "error": "Method Not Allowed", "message": "", "path": "/api/users" }
@JavaGuides
@JavaGuides 4 жыл бұрын
@@victor8888 select POST http method in postman
@victor8888
@victor8888 4 жыл бұрын
@@JavaGuides its working fine now. I had made a mistake in entity class I do not create a default super constructor. thnx for your amazing tutorial. :)
@victor8888
@victor8888 4 жыл бұрын
now my data save in DB but I now I want to add swagger in my application. have you any suggestion for me because I'm new for swagger my friend.
@JavaGuides
@JavaGuides 4 жыл бұрын
@@victor8888 check out my website for swagger API documentation tutorial or I have uploaded video as well ( video voice is little low but you can check out)
@sherazdaawataza2869
@sherazdaawataza2869 2 жыл бұрын
Very good Please Speak loudly very low volume
@ngoquangtruong3849
@ngoquangtruong3849 4 жыл бұрын
you are building api with spring boot use 3 layer architecture, right?
@JavaGuides
@JavaGuides 4 жыл бұрын
This is a simple Spring boot CRUD project and doesn't have business logic so I haven't created a service layer. If you want to create a service layer then check out my same another video tutorial at kzbin.info/www/bejne/gaDIaKJ5ZrikZsU.
@saddamkhalid1091
@saddamkhalid1091 4 жыл бұрын
i have an error in Jpa repository how can i resolve?
@JavaGuides
@JavaGuides 4 жыл бұрын
Provide error details?
@saddamkhalid1091
@saddamkhalid1091 4 жыл бұрын
@@JavaGuides In userRepository when you extend jparepository so jparepository give me an error of configuring build path
@vijaykumar-wu9jc
@vijaykumar-wu9jc 3 жыл бұрын
I followed same steps am getting error as Error:Could not find or load main class caused by java.lang.ClassNotFoundException Pls help me make one video on this how to resolve this issue in STS
@JavaGuides
@JavaGuides 3 жыл бұрын
Are you able build maven project successful?
@anantjain1263
@anantjain1263 3 жыл бұрын
Hey ramesh exception is not working I am not getting any message or anything
@JavaGuides
@JavaGuides 3 жыл бұрын
Spring Boot REST API Exception Handling at kzbin.info/www/bejne/rojRhmmuaqerr6M
@Satyaprakash-xs4jx
@Satyaprakash-xs4jx 3 жыл бұрын
Hibernate Validator not working in spring Boot ...what to do?
@JavaGuides
@JavaGuides 3 жыл бұрын
To use hibernate validator, Starting with spring Boot 2.3, we need to explicitly add the spring-boot-starter-validation dependency: org.springframework.boot spring-boot-starter-validation
@Satyaprakash-xs4jx
@Satyaprakash-xs4jx 3 жыл бұрын
Thank you so much
@SurajSoni-qs8st
@SurajSoni-qs8st 3 жыл бұрын
to {GET [/api/username]}: There is already 'userController' bean method Caused by: java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'userController' method org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'userController' method com.springweb.controller.UserController#getallUsers() got 3 types of error please resolve it
@asuvanikumar
@asuvanikumar 4 жыл бұрын
Where is service layer??
@JavaGuides
@JavaGuides 4 жыл бұрын
This is simple Spring boot project and don't have business logic so I haven't created service layer. If you want to create service layer then check out my same another video tutorial at kzbin.info/www/bejne/gaDIaKJ5ZrikZsU.
@ayushkumarsone4401
@ayushkumarsone4401 3 жыл бұрын
Sir help me WHat should I do ? { "timestamp": "2021-05-19T13:04:08.834+00:00", "status": 404, "error": "Not Found", "message": "", "path": "/api/users/" }
@JavaGuides
@JavaGuides 3 жыл бұрын
Pass id in URL. which REST api, you are calling?
@ayushkumarsone4401
@ayushkumarsone4401 3 жыл бұрын
@@JavaGuides sir post localhost:8080/api/users
@JavaGuides
@JavaGuides 3 жыл бұрын
@@ayushkumarsone4401 share the request JSON
@ayushkumarsone4401
@ayushkumarsone4401 3 жыл бұрын
Now it is working .. Downloaded your file from github... and did copy paste it is working...
@JavaGuides
@JavaGuides 3 жыл бұрын
@@ayushkumarsone4401 okay 👍
@JavaGuides
@JavaGuides 3 жыл бұрын
Free course - Angular + Spring Boot CRUD Full Stack Application at kzbin.info/aero/PLGRDMO4rOGcNzi3CpBWsCdQSzbjdWWy-f Free Course - ReactJS + Spring Boot CRUD Full Stack Application at kzbin.info/aero/PLGRDMO4rOGcNLnW1L2vgsExTBg-VPoZHr
@kirankumarkondapally237
@kirankumarkondapally237 3 ай бұрын
while running getting error as org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unknown access type record could you help us ..The version of STS iam using as Spring Tool Suite4 Version 4.22.0.Release17
Spring Boot REST API Exception Handling
15:29
Java Guides
Рет қаралды 85 М.
Create your FIRST CRUD RESTful API - Java, MySQL, Springboot, JPA, & Maven
18:38
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 70 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 20 МЛН
Schoolboy - Часть 2
00:12
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 3,1 МЛН
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 105 МЛН
JPA / Hibernate One to Many Mapping Example with Spring Boot
20:02
Top 25 Microservice Interview Questions Answered - Java Brains
39:54
Spring Data JPA Pagination
36:46
Dan Vega
Рет қаралды 18 М.
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 70 МЛН