添加依赖pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
springboot项目的配置文件
server.context-path=/demo
server.port=8086
management.security.enabled=false
举例:用来获取应用的各类健康指标信息
/health
请求查询结果: