Spring Boot REST API Exception Handling at ruclips.net/video/xWnU6x5BxyA/видео.html Spring Boot Rest API Validation with Hibernate Validator at ruclips.net/video/pjA9Pc7aTic/видео.html
@@vishalakshin1840 please check spring boot for beginners playlist on my youtube channel. It has ordered videos and I made it for spring boot beginners.
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!
Free course - Angular + Spring Boot CRUD Full Stack Application at ruclips.net/p/PLGRDMO4rOGcNzi3CpBWsCdQSzbjdWWy-f Free Course - ReactJS + Spring Boot CRUD Full Stack Application at ruclips.net/p/PLGRDMO4rOGcNLnW1L2vgsExTBg-VPoZHr
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
@@ayushkumarsone4401 add this into application.properties file server.error.include-message=always _ Then check if message is passed into () -> new UserNotFoundExceotion(->here
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; }
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.
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.
Getting error mentioned below. Can you please help? com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
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/" }
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
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
i have an error in console. im using gradle instead of mavan---- Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]
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 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 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)
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
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
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 ruclips.net/video/Koe7oC1Sq0c/видео.html.
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 ruclips.net/video/Koe7oC1Sq0c/видео.html.
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 at ruclips.net/video/xWnU6x5BxyA/видео.html
Spring Boot Rest API Validation with Hibernate Validator at ruclips.net/video/pjA9Pc7aTic/видео.html
I am a beginner of spring boot, Please arrange the playlist from basics and topic wise so that we can follow the playlist.
@@vishalakshin1840 please check spring boot for beginners playlist on my youtube channel. It has ordered videos and I made it for spring boot beginners.
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!
I am a beginner and was able to create rest API in first go itself. Great Explanation. Thank you so much
Free course - Angular + Spring Boot CRUD Full Stack Application at ruclips.net/p/PLGRDMO4rOGcNzi3CpBWsCdQSzbjdWWy-f
Free Course - ReactJS + Spring Boot CRUD Full Stack Application
at ruclips.net/p/PLGRDMO4rOGcNLnW1L2vgsExTBg-VPoZHr
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
Thank you! :)
Man you saved my time🎉, thank you!!
Covered full CRUD in a nice way. Great !!!!!!!
{
"timestamp": "2021-05-19T13:04:08.834+00:00",
"status": 404,
"error": "Not Found",
"message": "",
"path": "/api/users/"
} please help
@@ayushkumarsone4401 add this into application.properties file
server.error.include-message=always
_
Then check if message is passed into () -> new UserNotFoundExceotion(->here
Learning throught your training course is like finding a Gold ! You are genius man! Excelent Job!
Glad you enjoy it!
Very nice and very simple tutorial for beginners. Very well explained and easy to follow. Thank You!
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.
I am glad that you found this video tutorial useful
hey Ramesh, Thanks for this video, I have waited long for this
Super explanation and Thank you so much ,Ramesh
very nice explanation sir thankyou so much 🙏🏼🙏🏼🙏🏼, i am your new subscriber, and i really loves your videos
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;
}
}
great tutorial! JPA is working.
Very nicely explained with great presentation. Very useful with lots of spring boot information.
If your messages doesnt appear on the Exception just add this into application.properties file
server.error.include-message=always
thank you so much!
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.
👍Great work of knowledge sharing🙏
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.
Very helpful and useful. Thank you!
hey Ramesh, it was a neat and clean explanation even a beginner can understand, can you please explain the testing phase as well.
what a tutorial superrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
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!
Thanks, Java Guides!
thnx u for for ur serives
keep it up bro
Very good explanation. Thanks bro.
Thank you!
Best tutorial broooo
Very good. Thanks
This really good. could you also provide sample spring batch example
Hi Ramesh, please arrange the playlist order in topic-wise as on the website.
Getting error mentioned below. Can you please help?
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
you are the best.......
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/"
}
Pass id in URL. which REST api, you are calling?
@@JavaGuides sir post localhost:8080/api/users
@@ayushkumarsone4401 share the request JSON
Now it is working .. Downloaded your file from github... and did copy paste it is working...
@@ayushkumarsone4401 okay 👍
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
Thank you Sir, everything is pretty clear
Extremly helpful videos. Can you make one video on O-auth google or facebook authentication with react js/ boot application ?
please which app do you use for your screen recording
?
Camtesia
How to write if for id column as uuid type
Iam getting first name and last name values inserted as null
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
Great tutorial..but what about hateoas? I think it's one of the architectural constraints when building restful apis.
I will plan to create video tutorial on hateoas with continuation of this tutorial.
private UserRepository userRepository; what is the grammer in Java?
how to do bean validation
Thanks for the nice tutorial. I've one doubt regarding why we are using spring.jpa.properties.hibernate.dialect property?
dialect property hibernate uses to identify the underlying database and generates the SQL queries.
@@JavaGuides Thank you so much for clarifying this quickly, you're the best :)
I am getting Error while connecting to DB " java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)"
Configure database username and password as per your MySQL installation in application.properties file.
Very good Please Speak loudly very low volume
i have an error in console. im using gradle instead of mavan----
Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]
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"
}
@@victor8888 select POST http method in postman
@@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. :)
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.
@@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)
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
Are you able build maven project successful?
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
Hibernate Validator not working in spring Boot ...what to do?
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
Thank you so much
Hey ramesh exception is not working I am not getting any message or anything
Spring Boot REST API Exception Handling at ruclips.net/video/xWnU6x5BxyA/видео.html
you are building api with spring boot use 3 layer architecture, right?
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 ruclips.net/video/Koe7oC1Sq0c/видео.html.
i have an error in Jpa repository how can i resolve?
Provide error details?
@@JavaGuides In userRepository when you extend jparepository so jparepository give me an error of configuring build path
Where is service layer??
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 ruclips.net/video/Koe7oC1Sq0c/видео.html.
ok? great
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