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

即可。

啟動項目,訪問頁面驗證,成功!!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM