Join Shonna Smith for an in-depth discussion in this video Exception handling, part of Spring: Spring MVC (2018).
- The next thing we want to configure…is our exception handling.…Again I'm going to show a quick example…of how we can do this all completely…in Java based configuration options.…So to add some exception handling customizations…we're going to revisit a component that we started awhile ago.…We're going to up our controller advice.…If you remember we created this quote request…management advice class.…On your controller advice classes you had the option…of configuring some exception handling…that applies specifically to your controllers.…
So I just want to show you an example of how to do that.…So for this controller I'm going to create a method…that returns any response entity.…A string.…So let's imagine this was the case where we're handling…exceptions for our API dispatcher.…And we have to set the argument as the IOException.…Give that argument a variable name.…And in here we'll implement whatever we want to do…to make our exception handling.…
And in here I'm just going to add a simple comment.…Just indicating that we have more work to do…
- Using Spring MVC for web projects
- Spring MVC controllers
- Creating controllers and views
- Spring MVC models
- Creating the model
- Request mapping
- Spring MVC views
- Custom app configuration
Skill Level Intermediate
1. Using Spring MVC for Web Projects
2. Spring MVC Controllers
3. Spring MVC Models
4. Spring MVC Views
5. Custom App Configuration
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.