ControllerAdvice

In this tutorial, you will learn how to return a custom error message if the conditions of the Spring Method Security are not met. To learn more about method-level security annotations read: Spring Method-Level Security with @PreAuthorize, Spring Security @Secured: Method-Level Protection, @PostAuthorize Security Annotation Example. Controller class with Spring Method Security Annotation Let’s assume…

Read More Spring Method Security: Customize Error Message

With this Spring Boot tutorial, I will share how to handle exceptions in your RESTful Web Service application build with Spring Boot. Read the “Handling Exceptions in Project Reactor” tutorial if you use a project reactor. And to learn how to test your code for Exceptions, read the “Test for Exceptions with the JUnit” tutorial. What…

Read More Handle Exceptions in Spring Boot RESTful Service