Spring 3.2 introduces new annotation @ControllerAdvice annotation used for defining the exception handler with specific exception details for each method If any exception thrown on any part of the application will be handled by this component. In the previous release, we have configured GlobalException handling elements in the configuration files. With this new feature, it becomes more simple to handle the exceptions. Lets look at the example below to know how to implement in your project.
Showing posts with label Spring-annotaion. Show all posts
Showing posts with label Spring-annotaion. Show all posts
Saturday, 4 May 2019
Explain @ControllerAdvice in Spring
Spring 3.2 introduces new annotation @ControllerAdvice annotation used for defining the exception handler with specific exception details for each method If any exception thrown on any part of the application will be handled by this component. In the previous release, we have configured GlobalException handling elements in the configuration files. With this new feature, it becomes more simple to handle the exceptions. Lets look at the example below to know how to implement in your project.
Subscribe to:
Posts (Atom)
Spring Boot @ConfigurationProperties and Properties File
In this tutorial, you will learn to use @ConfigurationProperties to map properties files to POJO classes in Spring Boot application. Let’s ...
-
If you have used Hibernate in past then you know that one of the strongest points of Hibernate framework is caching, which can drastically ...
-
Difference between get and load method Here are few differences between get and load method in Hibernate. 1. Behavior when Object is no...
-
This annotation can be used as the method arguments or before the method declaration. The primary objective of this annotation to bind th...