Spring Boot in Action
Craig Walls
Foreword by Andrew Glover
  • December 2015
  • ISBN 9781617292545
  • 264 pages
  • printed in black & white

Easy to digest and fun to read.

From the Foreword by Andrew Glover, Netflix

A developer-focused guide to writing applications using Spring Boot. You'll learn how to bypass the tedious configuration steps so that you can concentrate on your application's behavior.

About the Technology

The Spring Framework simplifies enterprise Java development, but it does require lots of tedious configuration work. Spring Boot radically streamlines spinning up a Spring application. You get automatic configuration and a model with established conventions for build-time and runtime dependencies. You also get a handy command-line interface you can use to write scripts in Groovy. Developers who use Spring Boot often say that they can't imagine going back to hand configuring their applications.

About the book

Spring Boot in Action is a developer-focused guide to writing applications using Spring Boot. In it, you'll learn how to bypass configuration steps so you can focus on your application's behavior. Spring expert Craig Walls uses interesting and practical examples to teach you both how to use the default settings effectively and how to override and customize Spring Boot for your unique environment. Along the way, you'll pick up insights from Craig's years of Spring development experience.

Table of Contents detailed table of contents



about this book

author online

about the cover illustration


1. Bootstarting Spring

1.1. Spring rebooted

1.1.1. Taking a fresh look at Spring

1.1.2. Examining Spring Boot essentials

1.1.3. What Spring Boot isn’t

1.2. Getting started with Spring Boot

1.2.1. Installing the Spring Boot CLI

1.2.2. Initializing a Spring Boot project with Spring Initializer

1.3. Summary

2. Developing your first Spring Boot application

2.1. Putting Spring Boot to work

2.1.1. Examining a newly initialized Spring Boot project

2.1.2. Dissecting a Spring Boot project build

2.2. Using starter dependencies

2.2.1. Specifying facet-based dependencies

2.2.2. Overriding starter transitive dependencies

2.3. Using automatic configuration

2.3.1. Focusing on application functionality

2.3.2. Running the application

2.3.3. What just happened?

2.4. Summary

3. Customizing configuration

3.1. Overriding Boot auto-configuration

3.1.1. Securing the application

3.1.2. Creating a custom security configuration

3.1.3. Taking another peek under the covers of auto-configuration

3.2. Externalizing configuration with properties

3.2.1. Fine-tuning auto-configuration

3.2.2. Externally configuring application beans

3.2.3. Configuring with profiles

3.3. Customizing application error pages

3.4. Summary

4. Testing with Spring Boot

4.1. Integration testing auto-configuration

4.2. Testing web applications

4.2.1. Mocking Spring MVC

4.2.2. Testing web security

4.3. Testing a running application

4.3.1. Starting the server on a random port

4.3.2. Testing HTML pages with Selenium

4.4. Summary

5. Getting Groovy with the Spring Boot CLI

5.1. Developing a Spring Boot CLI application

5.1.1. Setting up the CLI project

5.1.2. Eliminating code noise with Groovy

5.1.3. What just happened?

5.2. Grabbing dependencies

5.2.1. Overriding default dependency versions

5.2.2. Adding dependency repositories

5.3. Running tests with the CLI

5.4. Creating a deployable artifact

5.5. Summary

6. Applying Grails in Spring Boot

6.1. Using GORM for data persistence

6.2. Defining views with Groovy Server Pages

6.3. Mixing Spring Boot with Grails 3

6.3.1. Creating a new Grails project

6.3.2. Defining the domain

6.3.3. Writing a Grails controller

6.3.4. Creating the view

6.4. Summary

7. Taking a peek inside with the Actuator

7.1. Exploring the Actuator’s endpoints

7.1.1. Viewing configuration details

7.1.2. Tapping runtime metrics

7.1.3. Shutting down the application

7.1.4. Fetching application information

7.2. Connecting to the Actuator remote shell

7.2.1. Viewing the autoconfig report

7.2.2. Listing application beans

7.2.3. Watching application metrics

7.2.4. Invoking Actuator endpoints

7.3. Monitoring your application with JMX

7.4. Customizing the Actuator

7.4.1. Changing endpoint IDs

7.4.2. Enabling and disabling endpoints

7.4.3. Adding custom metrics and gauges

7.4.4. Creating a custom trace repository

7.4.5. Plugging in custom health indicators

7.5. Securing Actuator endpoints

7.6. Summary

8. Deploying Spring Boot applications

8.1. Weighing deployment options

8.2. Deploying to an application server

8.2.1. Building a WAR file

8.2.2. Creating a production profile

8.2.3. Enabling database migration

8.3. Pushing to the cloud

8.3.1. Deploying to Cloud Foundry

8.3.2. Deploying to Heroku

8.4. Summary


Appendix A: Spring Boot Developer Tools

A.1. Automatic restart

A.2. LiveReload

A.3. Remote development

A.4. Development property defaults

A.5. Globally configuring developer tools

Appendix B: Spring Boot Starters

Appendix C: Configuration Properties

Appendix D: Spring Boot Dependencies

What's inside

  • Develop Spring apps more efficiently
  • Minimal to no configuration
  • Runtime metrics with the Actuator
  • Covers Spring Boot 1.3

About the reader

Written for readers familiar with the Spring Framework.

About the author

Craig Walls is a software developer, author of the poplular book Spring in Action, Fourth Edition, and a frequent speaker at conferences.

placing your order...

Don't refresh or navigate away from the page.
print book $26.99 $44.99 pBook + eBook + liveBook
Additional shipping charges may apply
Prints and ships within 3-5 days
Spring Boot in Action (print book) added to cart
continue shopping
go to cart

eBook $28.79 $35.99 3 formats + liveBook
Spring Boot in Action (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.
customers also reading

This book 1-hop 2-hops 3-hops

FREE domestic shipping on three or more pBooks