- 导入pom
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
- 配置yml(由于是2.0的将所有的端点都屏蔽了)
#开启actuator在springboot2 端口问题
management:
endpoints:
web:
exposure:
include: "*"
# exclude: env,beans 除去这两个端口外
- 配置shiroConfig
filterMap.put("/actuator/**", "anon");
- 打开链接
http://localhost:9999/actuator/info
至于actuator/后面的是接info还是其他的,主要看自己的要求