Getting Started with Spring CLI and Actuator
In the previous chapters, we have seen several ways to create a Spring Boot application using the Spring Boot web-based interface, STS IDE, and Spring Boot CLI. In this chapter, we will discuss Spring Boot CLI a bit deeper and will also see how to install CLI in your machine and how to create a Spring Boot application using the CLI interface.
By the end of this chapter, you will understand how to install and use Spring Boot CLI to develop Spring applications with more simplicity and understand how you can run this application using the CLI. Also, you will get understanding of Spring Boot's production-ready feature, the Actuator. The Spring Boot Actuator provides many endpoints to look at what's going on with your application in production.
This chapter will cover the following points:
- Getting started with using Spring Boot CLI:
- Installing the Spring Boot CLI
- Using the Initializr with the Spring Boot CLI
- Spring Boot Actuator:
- Taking Application's Insights
- Enabling Spring Boot's Actuator in your application
- Analyzing the Actuator's endpoints
- Exposing configuration details
- Exposing metrics endpoints
- Exposing application information
- Shutting down your application
- Customizing your Actuator endpoints
- Securing the Actuator endpoints
- The Actuator with Spring Boot 2.X
Let's look at these topics in detail.