在Spring Boot 2.0 中对Actuator变动很大,默认只提供/self,/health,/info这三个接口,如果想提供所有接口需要配置配置之后重新访问/actuator就会暴露出所有接口.
1,ymal方式:
添加application.yml文件,
management:
endpoints:
web:
exposure:
include: "*"
2,直接在appllication.properties中,添加配置
management.endpoints.web.exposure.include=["*"]