From the course: Complete Guide to Spring MVC
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
Controller advice - Spring Tutorial
From the course: Complete Guide to Spring MVC
Controller advice
- [Instructor] Controller advice. Controller advice annotation is a feature in Spring MVC that centralizes exception handling, model attribute initialization and data binding configuration across your application. Let's break down its use cases and implement it in our own Hello World application. In Spring MVC, the controller advice annotation provides a global mechanism to three things, to handle exception, to initialize model attributes, and to customize data binding and makes your application more organized and easier to maintain. You'll see in our upcoming example that all shared logic lives in one place. The three main features of controller advice annotation is that global exception handling, the shared model attributes and the custom data binding. And we also have some advanced features within controller advice annotation where you can filter controllers. This is where you can limit the scope of controller advice to specific controllers, using annotations, base packages and…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Declaration overview4m 32s
-
(Locked)
Declaration: AOP proxies6m 23s
-
(Locked)
Mapping requests overview5m 19s
-
Mapping requests: URI patterns5m 50s
-
(Locked)
Mapping requests: Consumable media types4m
-
(Locked)
Mapping requests: Producible media types3m 53s
-
(Locked)
Handler methods overview3m 9s
-
(Locked)
Handler methods: Method arguments2m 54s
-
(Locked)
Handler methods: Return values5m 2s
-
(Locked)
Handler methods: Type conversion4m 47s
-
(Locked)
Model3m 16s
-
(Locked)
@InitBinder overview7m 46s
-
(Locked)
Validation3m 33s
-
(Locked)
Exceptions overview4m 39s
-
(Locked)
Exceptions: Method arguments3m 56s
-
(Locked)
Exceptions: Return values6m 47s
-
(Locked)
Controller advice10m 32s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-