admin

admin监控#

image-20230303142401324

1.入門admin-server#

  1. 依賴

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

<dependency>
                <groupId>de.codecentric</groupId>
                <artifactId>spring-boot-admin-dependencies</artifactId>
                <version>${spring-boot-admin.version}</version>
                <type>pom</type>
                <scope>import</scope>
 </dependency>
  1. 开启配置和

    @EnableAdminServer
    
  2. 配置文件

server:
  port: 10086


spring:
  application:
    name: admin-server

eureka:
  client:
    service-url:
      defaultZone: http://peer2:8761/eureka

management:
  endpoints:
    web:
      exposure:
        include: '*'  # 暴露所有的监控端点 # 如果一个服务需要被监控 那么就要讲自身的一些情况(一些信息接口)暴露出去

2.入門admin-client#

  1. 依賴
<!--  暴露自身检查端点 endPoints 一个依赖 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
  1. 配置

    management:
        endpoints:
            web:
                exposure:
                    include: '*'
    

作者:Esofar

出处:https://www.cnblogs.com/firsthelloworld/p/17439913.html

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

posted @   我不想学编丿程  阅读(12)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
more_horiz
keyboard_arrow_up light_mode palette
选择主题
menu
点击右上角即可分享
微信分享提示