Я пытаюсь добавить конечную точку завершения actuator/shutdown
в моем приложении Spring, как описано в этого руководства , чтобы я мог корректно завершить работу приложения с помощью вызова, подобного curl -X POST localhost:8080/actuator/shutdown
.
* 1006. * Я добавил
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
к моим pom.xml
и
management:
endpoints.web.exposure.include: *
endpoint.shutdown.enabled: true
endpoints.shutdown.enabled: true
management.endpoint.shutdown.enabled: true
к src/main/resources/application.yaml
.
Но когда я запускаю curl -X POST localhost:8080/actuator/shutdown
, я получаю следующее Ответ:
{"timestamp":"2020-04-10T10:49:36.758+0000","status":404,"error":"Not Found",
"message":"No message available","path":"/actuator/shutdown"}
Я не вижу конечную точку отключения в http://localhost:8080/actuator
:
Что я делаю не так ? Что мне нужно изменить, чтобы появилась конечная точка actuator/shutdown
?