@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>

即可。

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

 

posted @ 2019-03-13 11:13  张左左  阅读(2127)  评论(0编辑  收藏  举报