1 Getting started with Spring

 

This chapter covers

  • Spring and Spring Boot essentials
  • Initializing a Spring project
  • An overview of the Spring landscape

Although the Greek philosopher Heraclitus wasn’t well known as a software developer, he seems to have had a good handle on the subject. He has been quoted as saying, “The only constant is change.” That statement captures a foundational truth of software development.

The way we develop applications today is different than it was a year ago, 5 years ago, 10 years ago, and certainly 20 years ago, before an initial form of the Spring Framework was introduced in Rod Johnson’s book, Expert One-on-One J2EE Design and Development (Wrox, 2002, http://mng.bz/oVjy).

Back then, the most common types of applications developed were browser-based web applications, backed by relational databases. Although that type of development is still relevant—and Spring is well equipped for those kinds of applications—we’re now also interested in developing applications composed of microservices destined for the cloud that persist data in a variety of databases. And a new interest in reactive programming aims to provide greater scalability and improved performance with nonblocking operations.

As software development evolved, the Spring Framework also changed to address modern development concerns, including microservices and reactive programming. The creators of Spring also set out to simplify its development model by introducing Spring Boot.

1.1 What is Spring?

1.2 Initializing a Spring application

1.2.1 Initializing a Spring project with Spring Tool Suite

1.2.2 Examining the Spring project structure

1.3 Writing a Spring application

1.3.1 Handling web requests

1.3.2 Defining the view

1.3.3 Testing the controller

1.3.4 Building and running the application

1.3.5 Getting to know Spring Boot DevTools

1.3.6 Let’s review

1.4 Surveying the Spring landscape

sitemap