Adding production-ready support
We've created a Spring web app with minimal code and released it to production. This is the perfect time to introduce production-grade support features.
There are some questions that often arise in production, and these are as follows:
- What do we do when the system administrator wants to configure his or her monitoring software to ping our app to see if it's up?
- What happens when our manager wants to know the metrics of people hitting our app?
- What are we going to do when the ops center supervisor calls us at 2:00 a.m. and we have to figure out what went wrong?
The last feature we are going to introduce in this chapter is Spring Boot's Actuator module. This module provides some super slick Ops-oriented features that are incredibly valuable in a production environment.
We start by adding this dependency to our build.gradle
as follows:
compile('org.springframework.boot:spring-boot-starter-actuator')
When you run this version of our app, the same business functionality...