美文网首页
Spring Boot Admin(监控工具)

Spring Boot Admin(监控工具)

作者: Tinyspot | 来源:发表于2022-11-23 22:56 被阅读0次

1. 监控工具

1.1 Admin Server

<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin-starter-server</artifactId>
    <version>2.7.7</version>
</dependency>

在启动类增加注解 @EnableAdminServer

访问地址 http://localhost:8010

image.png

1.2 Admin Client

引入依赖

<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin-client</artifactId>
    <version>2.7.7</version>
</dependency>

配置 application.yml

spring
  boot:
    admin:
      client:
        url: http://localhost:8010
  application:
    name: boot-starter

management:
  endpoints:
    web:
      exposure:
        include: '*' # 以web方式开放所有

spring.boot.admin.client.instance.name:客户端工程的名字。默认是默认值是spring-boot-application,若配置 spring.application.name,则取之

2. 监控内容

image.png

相关文章

网友评论

      本文标题:Spring Boot Admin(监控工具)

      本文链接:https://www.haomeiwen.com/subject/zqjtfdtx.html