@EnableHystrixDashboard注解无法使用情况

本人使用的是springboot 2.1.3,在引入hystrix仪表盘时,发现@EnableHystrixDashboard注解无法使用。

原来的pom配置

度娘之后,发现是springboot版本问题,只需要将

     <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
        </dependency>

替换成

     <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
        </dependency>

即可。

启动项目,访问页面验证,成功!!

原文地址:https://www.cnblogs.com/z0909y/p/10521837.html