Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Spring: Spring MVC

via LinkedIn Learning

Overview

Get started with Spring MVC, an essential web framework for Java developers who work on enterprise-level projects.

Syllabus

Introduction
  • Spring MVC for robust applications
  • What you should know
  • Exercise files and the demo app
1. Getting Started and Project Setup
  • Why use Spring MVC?
  • Features of Spring MVC
  • Spring MVC architecture
  • Create Maven Spring MVC project
  • Add folders and static files
  • Java configuration for Spring MVC
  • Add controllers and test the application
  • Generate Spring MVC project with Spring Boot
  • Add static files and view resolver
  • Add controllers and test the application
2. Implementing Controller Flows
  • Basic annotations for controllers
  • Create a controller with request mapping
  • @RequestParam in Controller
  • Add database code
  • Access data from Model
  • @ModelAttribute: Add JSP pages
  • @ModelAttribute: Access model attributes on JSP
  • @ModelAttribute: Add Spring form tag library
  • Test the application
3. Data Validation and Binding
  • Validating data in models
  • Add validations to user bean
  • Spring tags for errors
  • Localizing error messages
  • Binders overview
  • Binders demo
  • Convertors overview
  • Convertors demo
4. Exception Handling
  • DispatcherServlet and special bean types
  • Exception flow handler implementations
  • Custom error page and Login controller
  • Add method for selecting a user
  • Add exception handler in Controller
  • Global exception handler for application
  • Default model attributes using @ControllerAdvice
5. Async Request Processing
  • Conventional HTTP request processing
  • Spring MVC async processing under the hood
  • Async configuration
  • Return callable in Controller
  • DeferredResult implementation for async
6. View Resolvers
  • What are view resolvers?
  • Using XmlViewResolver
  • Using ResourceBundleViewResolver
  • Chaining view resolvers
  • Chaining view resolvers demo
7. Interceptors and Themes
  • Introduction to interceptors
  • Built-in and custom interceptors
  • Add interceptor class
  • Register interceptors
  • Request and session attributes
  • Save and get SessionAttributes demo
  • Test session flow and implement forwarding
  • End HttpSession
  • Redirecting outside an application
  • Introduction to themes
  • Define themes and theme resolver
  • Define ThemeChangeInterceptor
  • Pick themes on JSPs
  • Introduction to l10n and i18n
  • Automatic locale resolution demo
  • CookieLocaleResolver and interceptor for l10n and i18n
8. Spring MVC REST Controllers
  • RESTful services recap
  • Use @Controller and @ResponseBody
  • Use @RequestController and @ResponseEntity
  • Use @PathVariable and @RequestParam to get request payload
  • Use @RequestBody and @ResponseEntity
  • Use @ExceptionHandler
  • Testing the @ExceptionHandler with the @ResponseEntity
  • MVC vs. REST controllers
Conclusion
  • Next steps

Taught by

Ketkee Aryamane

Reviews

4.7 rating at LinkedIn Learning based on 180 ratings

Start your review of Spring: Spring MVC

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.