1,在pom中添加Actuator的坐标。

2,在全局配置文件中设置关闭安全限制。

3,请求路径关键字

SpringBoot监控

SpringBoot监控

二、使用可视化监控报表-SpringBootAdmin

1,搭建服务端

  服务端其实也是一个SpringBoot项目

添加pom依赖

1 <dependency>
2     <groupId>de.codecentric</groupId>
3     <artifactId>spring-boot-admin-starter-server</artifactId>
4     <version>1.5.7</version>
5 </dependency>

修改启动类

1 @SpringBootApplication
2 @EnableAdminServer
3 public class SpringBootServerApplication {
4     public static void main(String[] args) {
5         SpringApplication.run(SpringBootServerApplication.class, args);
6     }
7 }

2,搭建客户端

  客户端其实就是我们要监控的工程

修改客户端pom依赖

1 <dependency>
2     <groupId>de.codecentric</groupId>
3     <artifictId>spring-boot-admin-starter-client</artifactId>
4     <version>1.5.7</version>
5 </dependency>

修改客户端的application.properties配置文件

1 management.security.enabled=false
2 spring.boot.admin.url: http://127.0.0.1:9000 

相关文章:

  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-11-19
  • 2021-08-30
  • 2021-11-04
猜你喜欢
  • 2021-08-14
  • 2021-10-06
  • 2022-01-18
  • 2022-01-26
  • 2021-04-02
  • 2022-01-05
相关资源
相似解决方案