1、springboot版本2.1.3
2、pom.xml加了
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
3、application.properties加了
management.endpoints.shutdown.enabled=true management.endpoints.shutdown.sensitive=false management.endpoints.web.exposure.include=*
4、请求http://127.0.0.1:8222/actuator/
返回值:
{ "_links": { "self": { "href": "http://127.0.0.1:8222/actuator", "templated": false }, "auditevents": { "href": "http://127.0.0.1:8222/actuator/auditevents", "templated": false }, "beans": { "href": "http://127.0.0.1:8222/actuator/beans", "templated": false }, "caches-cache": { "href": "http://127.0.0.1:8222/actuator/caches/{cache}", "templated": true }, "caches": { "href": "http://127.0.0.1:8222/actuator/caches", "templated": false }, "health-component-instance": { "href": "http://127.0.0.1:8222/actuator/health/{component}/{instance}", "templated": true }, "health": { "href": "http://127.0.0.1:8222/actuator/health", "templated": false }, "health-component": { "href": "http://127.0.0.1:8222/actuator/health/{component}", "templated": true }, "conditions": { "href": "http://127.0.0.1:8222/actuator/conditions", "templated": false }, "configprops": { "href": "http://127.0.0.1:8222/actuator/configprops", "templated": false }, "env-toMatch": { "href": "http://127.0.0.1:8222/actuator/env/{toMatch}", "templated": true }, "env": { "href": "http://127.0.0.1:8222/actuator/env", "templated": false },
并没有shutdown,post请求http://127.0.0.1:8222/actuator/shutdown也报404,请求是哪里还需要配置吗?
相关分类