pom 配置 文件中
<!-- 引入Actuator 起步依赖 -->
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

在配置文件 application.yml 中 配置 management
include 设置为 * 暴露 Actuator 所有节点
enabled 设置为 true 开启可以通过请求来关闭程序的功能
management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: ALWAYS
    shutdown:
      enabled: true
  server:
    port: 9001

*** 注意 *** server 端口级别。