参考spring
https://www.jianshu.com/p/44ef43b282f0
这里只描述经过HTTP Shutdown安全
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
endpoints: shutdown: enabled: true #启用shutdown sensitive: false #禁用密码验证
curl -X POST localhost:8080/shutdown
- 该方式支持远程调用,推荐在内网环境下使用 - 若是要增长安全设置请参考原文,本人未测试该特性