spring actuator
官方文档:Spring Boot Actuator
- maven项目配置:
添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
- 在项目的application.yml 里面配置
具体配置参考:
https://docs.spring.io/spring-boot/docs/2.0.7.RELEASE/reference/htmlsingle/#production-ready-endpoints-enabling-endpoints
management:
endpoints:
web:
exposure:
include: "*" #暴露所有接口
endpoint:
shutdown.enabled: true #允许shutdown
health.show-details: always #展示详细的health信息
jolokia:
en