使用SpringAdmin

2018-05-03  本文已影响44人  8813d76fee36

搭建SpringAdmin Server端

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

至此Server端搭建完毕,访问http://localhost:8080/即可看到主页面。

搭建Spring Admin Client端

        <dependency>
            <groupId>de.codecentric</groupId>
            <artifactId>spring-boot-admin-starter-client</artifactId>
        </dependency>
spring.boot.admin.auto-registration=true  # 开启自动注册
spring.boot.admin.url=http://localhost:8080 # 配置Server端地址
spring.boot.admin.client.name=AdminClientTest  # 客户端名称
endpoints.sensitive=false # 开放所有监控端点

至此Client端搭建完成。

效果

分别启动Server端和Client端,并访问Server端,默认URL:http://localhost:8080

主页
点击Details即可查看详情数据。
上一篇 下一篇

猜你喜欢

热点阅读