使用 spring-boot-starter-actuator

2021-01-22  本文已影响0人  高节

使用 spring-boot-starter-actuator 动态修改项目日志级别,这也是今天在网上查日志相关的问题发现的骚操作,所以自己试了一下,感觉这个太牛批了,操作也很简单

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
       <!-- 健康检查和一些监控 -->
       <dependency>
           <groupId>org.springframework.boot</groupId>
           <artifactId>spring-boot-starter-actuator</artifactId>
       </dependency>
# 健康检查相关配置
management:
  endpoints:
    web:
      exposure:
        include: '*'

然后现在就可以开始访问接口了

上一篇 下一篇

猜你喜欢

热点阅读