chapter seven

7 Understanding Spring Boot and Spring MVC

 

This chapter covers

  • Implementing your first web app
  • Using Spring Boot in developing Spring apps
  • Understanding the Spring MVC architecture

Now that you know all the needed Spring basics, let’s focus on web apps and how you use Spring to implement them. You can use all the Spring capabilities we discussed until now to implement any kind of app. But often, with Spring, the applications you will implement are web apps. In chapters 1 through 6, we discussed the Spring context and aspects which are mandatory for understanding what comes next in the book (including what you’ll find in this chapter). If you jumped directly to this chapter, and you don’t know yet how to work with the Spring context and aspects, you might find our discussion difficult to understand. I strongly recommend you first make sure you know the basics of using the framework before going further.

Spring makes web app development straightforward. We’ll start this chapter in section 7.1 by discussing what web apps are and how they work.

7.1      What is a web app?

7.1.1   A general overview of a web app

7.1.2   Different fashions of implementing a web app with Spring

7.1.3   Using a servlet container in web apps development

7.2      The magic of Spring Boot

7.2.1   Using a project-initialization service to create a Spring Boot project

7.2.2   Using dependency starters to simplify the dependency management

7.2.3   Using autoconfiguration by convention based on dependencies

7.3      Implementing a web app with Spring MVC

7.4      Summary