引入相关依赖包
<!--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
get请求访问http://127.0.0.1:20000/actuator即可
参考 https://blog.csdn.net/zhouzhiwengang/article/details/111270893