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.

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 ...