SpringBoot入门(四)-----如何使用监控,健康检查,项目信息

需要导入actuator依赖:
 		<!-- 监控中心 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

然后在application.properties里添加如下配置,避免用户访问部分监控地址时访问受限

management:
  security:
    enabled: false

然后我们可以用/actuator来查看各种信息(监控,健康等),比如localhost:8080/actuator
在这里插入图片描述

世界上有10种人,一种是懂二进制的,一种是不懂二进制的。

感谢您的收看,如有哪里写的不对 请留言,谢谢。

发布了71 篇原创文章 · 获赞 54 · 访问量 42万+

猜你喜欢

转载自blog.csdn.net/weixin_43326401/article/details/104072484