展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

收集数据服务器

  • 构建1个新项目作为收集数据的服务器

  • pom.xml中导入依赖

<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>2.3.1</version>
</dependency>
  • 启动类添加注解
@EnableAdminServer
  • 配置yml
server.port=8888
  • 在被监控的项目中配置如下
# pom
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>2.3.1</version>
</dependency>
# yml
spring:
boot:
admin:
client:
url: http://localhost:8888 # 服务端地址
instance:
prefer-ip: true #使用ip注册进来
management:
endpoints:
enabled-by-default: true #默认开启所有监控端点 true
web:
exposure:
include: '*' # 以web方式暴露所有端点
  • 启动客户端和服务端
posted @   DogLeftover  阅读(53)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示