1.SpringBootActuator提供了很多监控端点,可以使用http://{ip}/{port}/{endpoint}形式访问,了解程序的运行状况。
2.查看健康指标(简单显示):
在pom文件中添加依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
访问http://localhost:8000/health

3.查看健康指标(详细显示):
在application文件中添加
management: security: enabled: false
访问http://localhost:8000/health

浙公网安备 33010602011771号