1、简述
监管嘛,就是看你程序有什么东西,正在运行的,什么权限之类的东西
2、使用方法
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
application.properties中设置
#有权利访问各种监管
management.endpoints.web.exposure.include=*
#打开shutdown功能(发送请求让Java程序关闭)
management.endpoint.shutdown.enabled=true
1)一些简单的东西
比如我们访问http://localhost:8080/actuator/beans
你有什么bean,这里都会显示,
又比如访问http://localhost:8080/actuator/env
显示了环境变量。
2)shutdown
我个人认为最爽的还是shutdown,这个可以通过浏览器让Java程序关闭,不过要发post请求才可以
http://localhost:8080/actuator/shutdown