引入相关依赖包
<!--actuator-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
# 健康检查配置
management:
endpoints:
web:
exposure:
include: "*"
server:
port: 20000
servlet:
context-path: /
ssl:
enabled: false
endpoint:
health:
show-details: always
访问/actuator即可
参考 https://blog.csdn.net/zhouzhiwengang/article/details/111270893
原文:https://www.cnblogs.com/yxj808/p/14333924.html