Skip to content

saurabhkumar998/validation-and-exception-handing-spring-boot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

exception-handing-spring-boot learning validation and exception handling in spring boot application

There are two ways to handle exceptions in a spring boot application:

  1. Creating a Base Controller, which all the other RestControllers will extend. The base controller contains methods annotated with @ExceptionHandler which handles exceptions

  2. The best way is to create a Seperate Class annotated with @RestControllerAdvice or @ControllerAdvice which contains methods annotated with @ExceptionHandler which handles exceptions.

About

learning exception handling in spring boot application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages