Tags: Rest api request validation rest api exception handling spring bean validation exception handling in spring exception handling in spring boot request validation in spring boot javatechie spring boot Handling validation error in spring exception handling
This tutorial will explain you the process of Handling request validation and exception handling with example
#javatechie #SpringBoot #Validation #ExceptionHandling
GitHub:
https://github.com/Java-Techie-jt/validation-exception-handling
Blogs:
https://medium.com/@javatechie
Facebook:
https://www.facebook.com/groups/javatechie
guys if you like this video please do subscribe now and press the bell icon to not miss any update from Java Techie
Disclaimer/Policy:
--------------------------------
Note : All uploaded content in this channel is mine and its not copied from any community ,
you are free to use source code from above mentioned GitHub account
or
Question
Why would you .yml file for the database configuration when you can declare it in application.properties. That makes it a lot more easer....
Nice one.. Probably you could have used optional for getting users from repository? Also for handling null..Also for user not found it should be 404..not 500 👍.. Also a request if you can make a postman test suite or any kind of integration test suite..with list of test cases like create user first expect user to be created ..get user details later..handle both positive and negative scenarios..it would be great
UserNotFoundException should be extended with RuntimeException isn't it? So that you can avoid throws keywords at the controller layer.
I think the response code for User not found should be 404 than 500..
Any courses You offer in udemy or anywhere , i m interested to buy.