1、在springboot pom中添加依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<!-- <version>2.1.3.RELEASE</version> -->
</dependency>
2、解决一些节点不能访问:
在application.properties中添加配置:management.endpoints.web.exposure.include=*