标签:adb import int span exp width art pid points
1.添加依赖
<!-- 仪表盘监控 --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
2.添加启动类注解@EnableHystrixDashboard
import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard; import org.springframework.cloud.openfeign.EnableFeignClients; @SpringBootApplication @MapperScan("cn.ytheng.order_service") @EnableFeignClients @EnableCircuitBreaker @EnableHystrixDashboard public class OrderServiceApplication { public static void main(String[] args) { SpringApplication.run(OrderServiceApplication.class, args); } }
3.修改application.yml配置
server:
port: 8781
#暴露全部的监控信息
management:
endpoints:
web:
exposure:
include: "*"
4.访问地址
http://localhost:8781/actuator/hystrix.stream
SpringCloud------断路器Dashboard监控仪表盘
标签:adb import int span exp width art pid points
原文地址:https://www.cnblogs.com/tianhengblogs/p/12491845.html