Spring Boot actuators for microservices instrumentation
The previous sections explored most of the Spring Boot features required for developing a microservices. In this section, we will explore some of the production-ready operational aspects of Spring Boot.
Spring Boot actuators provide an excellent out-of-the-box mechanism for monitoring and managing Spring Boot microservices in production.
Note
The full source code of this example is available as the chapter3.bootactuator
project in the code files of this book under the following Git repository:https://github.com/rajeshrv/Spring5Microservice
Create another Spring starter project, and name it as chapter3.bootactuator.application
; this time, select the Web
, HAL browser, hateoas,
and Actuator
dependencies. Similar to chapter3.bootrest
, add a GreeterController
endpoint with the greet method. Add management.security.enabled=false
to the application.properties
file to grant access to all endpoints.
Do the following to execute the application:
- Start...