1,引入actuator
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
2,application.properties 配置
management.endpoint.health.show-details=always
但是访问必须加上actuator,不知为什么
http://localhost:8180/actuator/health
网友评论