# Spring Boot Admin 客户端

# 添加依赖

在需要被管理的服务中加入以下依赖

<dependency>
    <groupId>org.jolokia</groupId>
    <artifactId>jolokia-core</artifactId>
</dependency>
<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
1
2
3
4
5
6
7
8

其中 spring-boot-admin-starter-client 的版本号为:2.1.6,这里没写版本号是因为我已将版本号托管到 dependencies 项目中

# application.yml

设置 Spring Boot Admin 的服务端地址

spring:
  boot:
    admin:
      client:
        url: http://localhost:8084
1
2
3
4
5

至此配置完成,在所需的地方加入上述的依赖和配置后,即可加入Spring Boot Admin的服务监控。

最近更新: 2019/10/17 上午4:20:42