From the course: Spring: Spring MVC
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Exception flow handler implementations
From the course: Spring: Spring MVC
Exception flow handler implementations
- [Instructor] Now let us take a look at the Exception Handling part of Spring MVC. Exception handling, of course, is managed by a DispatcherServlet. We've already spoken of this before. But how? So whenever an exception occurs in your application, the DispatcherServlet is going to delegate the responsibility of exception handling to the HandlerExceptionResolver special bean type. Now this special bean has many implementations inside the framework. We will look at those in a minute. We spoke about exception handling, we said that DispatcherServlet is going to do that stuff for us, but what does exception handling actually mean in an application? So let's say you have an exception that has occurred in your application. You will have to decide the next course of action for that exception. Do you want to just go back to that calling method and throw that exception again? Or, do you want to extract the error message…
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
-
-
-
-
-
-
DispatcherServlet and special bean types3m 12s
-
Exception flow handler implementations4m 33s
-
Custom error page and Login controller4m 1s
-
Add method for selecting a user5m 51s
-
Add exception handler in Controller6m 28s
-
Global exception handler for application4m 52s
-
Default model attributes using @ControllerAdvice4m 27s
-
-
-
-
-
-