Spring Boot in Action - Book Review


Spring is the de facto solution for creating Java apps. Besides its popularity and ease of use, it offers solutions for a lot of common problems in the development process. With all the power, Spring was also known for requiring some tedious XML configuration. This got better in the latest versions, and Spring Boot is the next step in enforcing the well known convention over configuration approach.

Spring Boot in Action will be a good fit for you if you have a solid experience working with Spring, and you want to take a quick look at the new and improved way of developing Spring applications. However, if you don’t have a good understanding of the framework’s internals, I’d advice you to start with the far better Spring in Action.

Chapters of interest: Since it is quite a lite book which focuses on a topic that lacks complexity if you know your way around the framework, only a few chapters may be considered mandatory: Customizing configuration (3), Testing (4), Grails with Spring Boot(6), The Actuator(7).

Probably Craig Walls had a difficult job in writing Spring Boot in Action, mainly because there simply isn’t enough material to write a book on this subject. Even though the technology is incredibly powerful, and it relies on complex mechanisms under the hood, Spring Boot manages to be a very easy to use solution.

This simplicity combined with the obvious task of trying to avoid covering core Spring functionality (which is very well handled in Spring in Action) left just a handful of topics to be debated. These constraints led to more than 60 pages of Appendix data (full of dependencies and properties listings), pages full of JSON outputs for demo purposes and unnecessary print screens of pretty basic work flows. Just like I was agonizing over my high school papers, Walls used all the tricks to deliver enough content for Manning to publish a new book.

Excluding all the quantity content, you are probably left with half a book of quality information which covers pretty well all the improvements Spring Boot brings to the table.

For a long time, XML configuration was a necessary evil in the Java enterprise world. Right from the start, part of Spring’s appeal was its focus on simplicity and convention over configuration. With this approach it managed not only to surpass its competitors, but to force entire JEE standards to get up to speed by dumping most of their complex configuration processes.

With the pain of configuration gone, Spring Boot follows naturally in the attempt of build a better enterprise. Long gone are the days in which starting a new Java EE project required hours of setting up application servers, data sources and library dependencies. The Spring Boot project will handle most of these things for you, providing sensible defaults, and offering straight forward techniques to override any of the out of the box behaviors. To give you an idea about the level of auto-configuration involved, the project ships with an internal Tomcat that handles your application deployment by default. In most cases you’ll end up with a ready to use setup which will allow you to start coding immediately.

Spring Boot in Action does a great job explaining how this auto-configuration works. Furthermore, it runs through the most common scenarios and dependencies, describing the structure of an usual Java project - from database setup to testing tools. However, it is important to note that most of these details will be familiar to you if you already looked into an existing Spring Boot project.

While Spring’s additions to the development process are more than welcomed, a known Java flaw is its reliance on boilerplate code and general code noise. If you are one of those who can’t stand explicit getters and setters for instance, Project Lombok is a possible solution for you. However, Spring Boot leverages a much better tool by allowing you to use Groovy in your project. Chapter 5 runs through a Groovy based example using the Spring Boot CLI, while Chapter 6 experiments with Grails framework in the Spring Boot ecosystem. For those unfamiliar with it, Grails is a very powerful, high-level framework built on top of Spring and Hibernate.

Another great feature the book covers pretty well is the Spring Boot’s Actuator. The Actuator offers production-ready tools focusing on monitoring and displaying metrics for your application. In the usual Spring Boot style, this tool is a highly configurable, and Walls spends the necessary time to cover all the scenarios the Actuator can handle.

All in all, Spring Boot in Action has a quite narrow target audience. If your Spring knowledge is rusty or insufficient, this book may be too high level for you. On the other hand, if you already spent some time looking into Spring Boot, you can easily skip most of the book’s content. Walls does a good job presenting a general overview of the most common framework features, but the information is not as concise as some of us would expect.