在客户端添加如下配置

pom依赖 actuator.jar包

  <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
或者
<dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

application.yml全局配置文件添加如下

management:
endpoints:
web:
exposure:
include: shutdown #暴漏shutdown端点服务
endpoint:
shutdown:
enabled: true

然后在postman里边用post请求方式,请求如下地址

http://ip:port/actuator/shutdown

官方介绍:

https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html

最新文章

  1. TCP三次握手的正确使用姿势
  2. MVC学习系列8--分页和排序
  3. C语言变参问题
  4. C++中不可重载的5个运算符
  5. ssh连接阿里云一段时间不操作自动断开
  6. 类库探源——System.Drawing.Bitmap
  7. PHP - 日期与时间
  8. swift 笔记2
  9. Oracle 生成一张测试表并插入随机数据
  10. js 闭包的用法详解
  11. 【Java入门提高篇】Day13 Java中的反射机制
  12. H5 FormData对象的作用及用法
  13. Android全平台书籍
  14. HeapSter安装(k8s1.12以后废弃了)
  15. 一元线性回归与R语言
  16. 《精通CSS层叠样式表》
  17. Ubuntu编译gdb-ARM调试环境
  18. centos 修改host
  19. VGGnet——从TFrecords制作到网络训练
  20. singer页左侧滚动的时候右侧跟随高亮显示

热门文章

  1. mysql 忘记登录密码(修改root密码)
  2. 【nodejs原理&源码赏析(1)】Express中间件系统的基本实现
  3. 华为ARM64服务器上手体验--不吹不黑,用实际应用来看看TaiShan鲲鹏的表现
  4. 卸载&amp;&amp;更新docker(ubuntu)
  5. react-native测试安装
  6. [TimLinux] HTTP cookie与session技术
  7. ACM小组的古怪象棋
  8. B.Silly Mistake
  9. 【面试】386- JavaScript 面试 20 个核心考点
  10. rails 创建项目、创建controller、model等