O'Reilly logo
live online training icon Live Online training

Spring MVC fundamentals

Building web applications and RESTful web services

Topic: Software Development
Ken Kousen

The Spring Framework is one of the most popular Java open source libraries. It’s easy to create flexible and straightforward web applications and later added the same ease of use for RESTful web services. Then Spring Boot streamlined both processes.

Join expert Ken Kousen to learn how to create, deploy, and maintain web applications and RESTful web services with the Spring MVC module. You’ll better understand how Spring does its job as you identify the underlying features that make this simple development possible. By the time you’re through, you’ll know everything you need to build web REST applications with Spring to suit your needs.

What you'll learn-and how you can apply it

By the end of this live, hands-on, online course, you’ll understand:

  • The architecture of Spring MVC applications
  • The extensive simplifications provided by Spring Boot
  • The layers of controllers, handler mappings, and template engines

And you’ll be able to:

  • Build and configure Spring MVC web applications
  • Test and deploy web apps and RESTful web services
  • Apply basic security to web resources

This training course is for you because...

  • You’re an experienced Java developer who’s interested in how Spring MVC can improve your web apps.
  • You’re a team member or leader who needs to build and support applications using the Spring Framework.

Prerequisites

  • Experience with Java and the Spring Framework
  • General knowledge of the functional features in Java 8 and above (streams, Lambda expressions, and method references)

Recommended preparation:

Recommended follow-up:

About your instructor

  • Ken Kousen is the author of the Kotlin Cookbook (O'Reilly), Modern Java Recipes (O'Reilly), Gradle Recipes for Android (O’Reilly), and Making Java Groovy (Manning), as well as O’Reilly video courses in Android, Groovy, Gradle, advanced Java, and Spring. A JavaOne Rock Star, he’s a regular speaker on the No Fluff Just Stuff conference tour and has spoken at conferences all over the world. Through his company, Kousen I.T., Inc., he’s taught software development training courses to thousands of students.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Spring MVC architecture (20 minutes)

  • Lecture: Major concepts; processing requests and responses; configuration options; test support

Spring Boot simplifications (30 minutes)

  • Lecture: Spring MVC autoconfiguration; HTTP message converters; custom JSON serializers; static content; template engines
  • Hands-on exercises: Complete exercise on basic web app and RESTful web service
  • Q&A
  • Break (10 minutes)

Special bean types (20 minutes)

  • Lecture: Handler mappings; view resolvers; filters and interceptors; exception resolvers
  • Break (5 minutes)

Responding to requests (30 minutes)

  • Lecture: Types of view resolvers; redirects; forwards; content negotiation
  • Q&A
  • Break (10 minutes)

Annotated controllers (30 minutes)

  • Lecture: Request mapping; handler methods; model objects; data binding
  • Hands-on exercises: Complete exercise on forwards, redirects, and content negotiation
  • Q&A
  • Break (5 minutes)

Functional endpoints (20 minutes)

  • Lecture: Handler functions; router functions; filters
  • Q&A
  • Break (10 minutes)

Basic web security (20 minutes) - Lecture: Authentication; authorization; Java configuration; testing

Additional topics (20 minutes)

  • Lecture: Logging; asynchronous requests; CORS; HTTP caching; HTTP/2
  • Hands-on exercise: Secure your application

Wrap-up and Q&A (10 minutes)