一、热部署

  • 添加依赖+Ctrl+F9
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
  <optional>true</optional>
</dependency>

二、监控

  • 添加依赖
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
  • yml配置
management.security.enabled=false

自定义健康信息

@Component
public class MyAppHealthIndicator implements HealthIndicator {

    @Override
    public Health health() {

        //自定义的检查方法
        //Health.up().build()代表健康
        return Health.down().withDetail("msg","服务异常").build();
    }

 

相关文章:

  • 2021-06-16
  • 2021-09-13
  • 2021-05-03
  • 2021-08-10
猜你喜欢
  • 2021-12-12
  • 2022-12-23
  • 2021-07-17
  • 2021-08-15
  • 2022-01-06
  • 2022-12-23
相关资源
相似解决方案