actuator–基础–04–Springboot集成
代码位置
https://gitee.com/DanShenGuiZu/learnDemo/tree/master/actuator-learn/actuator01
1、代码
1.1、依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
只要加上了这个依赖,SpringBoot 在运行時就会自动开启下面两个 endpoint
/actuator/health
/actuator/info
其他endpoint因为安全因素,所以需要另外设置才能打开
1.2、测试
http://localhost:8080/actuator