1.引入actuator所需要的jar包
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
2.添加actuator所需要的配置(注意:如果使用properties文件management.endpoints.web.exposure.include=*,此处不能加引号)
management: endpoints: web: exposure: #加载所有的断点 默认只加载了info,health include: '*' endpoint: health: show-details: always shutdown: enabled: false
3.可通过访问以下连接进行测试
http://localhost:8080/actuator/health
4.更多详细配置可查看