pom文件
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
application.yml
endpoints:
shutdown:
enabled: true #启用shutdown
sensitive: false
linux命令
curl -X POST host:port/shutdown