liveBook · Manning

Chapter 7: Understanding Spring Boot and Spring

What you will learn in chapter 7 of Spring Start Here, Second Edition

This introduction shifts the focus to Spring web apps and explains why Spring Boot makes Spring applications quicker to create.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction shifts the focus to Spring web apps and explains why Spring Boot makes Spring applications quicker to create.

Key terms: Spring Boot, Spring ecosystem, ready-to-use configuration

7.1 What is a web app?

Defines a web app by how people access it and explains why browser access is convenient compared with installed desktop apps.

Key terms: web app, web browser, desktop app

7.1.1 A general overview of a web app

This section explains the client and server sides of a web app, how they exchange requests and responses, and how one backend serves multiple clients.

Key terms: client side, server side, frontend, backend, requests, responses, multiple clients concurrently

7.1.2 Different fashions of implementing a web app with Spring

This section contrasts backend-prepared views with frontend-backend separation and explains why the latter can help larger web apps.

Key terms: frontend-backend separation, fully prepared view, raw data, frontend app, independently managed, deployment

7.1.3 Using a servlet container in web app development

The section explains how HTTP requests reach a Spring web app through a servlet container and a servlet, without requiring developers to implement HTTP handling or servlets themselves.

Key terms: HTTP, request-response, servlet container, Tomcat, HTTP messages, communication layer, servlet, entry point, HTTP request, HTTP response

7.2 The magic of Spring Boot

This section explains how Spring Boot reduces the configuration work involved in creating Spring apps and introduces three ways it does so.

Key terms: Spring Boot, servlet container, business code, configurations, project initialization service, skeleton app, dependency starters, dependencies, autoconfiguration based on dependencies, default configurations

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

This section shows how to generate a Spring Boot web project with Spring Initializr and identifies the main files and Maven configuration it creates.

Key terms: Spring Initializr, start.spring.io, Generate, Spring Web, Main class, @SpringBootApplication, pom.xml, Spring Boot Maven plugin, spring-boot-starter-webmvc, application.properties

7.2.2 Using dependency starters to simplify the dependency management

This section explains how Spring Boot dependency starters simplify adding capabilities by supplying compatible groups of dependencies.

Key terms: dependency starter, capabilities, pom.xml, compatible version, spring-boot-starter-webmvc, External Libraries, JAR archives, Spring context, AOP, Tomcat

7.2.3 Using autoconfiguration by convention based on dependencies

This section explains how Spring Boot uses dependencies to choose conventional default configurations, reducing the configuration developers must write.

Key terms: autoconfiguration, convention-over-configuration, web dependency, Tomcat, servlet container

7.3 Implementing a web app with Spring MVC

This section builds a simple static Spring MVC page and explains how a browser request reaches its controller and returns the page.

Key terms: resources/static, @Controller, controller action, @RequestMapping, Tomcat, dispatcher servlet, front controller, handler mapping, view, Spring Boot

7.4 Questions

This section lists questions for readers to check their understanding of chapter 7; it does not explain the answers.

7.5 Summary

Summarizes the web request-response flow and how Spring Boot reduces the setup needed to implement it with Spring MVC.

Where this is used later

Concepts explained in this chapter

← Chapter 6: Using aspects with Spring AOP Chapter 8: Implementing web apps with Spring Boot and Spring MVC →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.