pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
application.yml
management:
endpoints:
web:
exposure:
#include是启用所有端点
include: "*"
#exclude是禁用某些端点
exclude: "env,beans"
查看项目启动日志: