Health monitoring brief
Spring Boot in actuator Module provides health check , Audit 、 Index collection ,HTTP Tracking and other functions , Can help us better manage and track springboot project .
Health monitoring configuration implementation
In projects that need to use health monitoring or module in , Add the following dependencies ：
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
After adding dependencies ,reload Item or module.
Health monitoring starts analysis
Start project , Enter the following address in the browser ：(SpringBoot Limited options for monitoring by default )
The results of the visit , As shown in the figure :
You can also do it in actuator Click on the list of choices , For example, to access health
The result is , As shown in the figure ( among up State means normal ):
If you want to see more actuator Options , Can be in spring boot Configuration file
application.properties Add the following statement to :
then , Restart the server , Based on access http://localhost/actuator Address ...)