import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard 引入不进去 @enablehystrixdashboard
pom 如下
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-hystrix-dashboard</artifactId>
</dependency>
已经引入了,所以就在网上查看了一下发现是Spring Boot版本的问题。需要把依赖替换一下:
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-javanica</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-hystrix-dashboard</artifactId>
</dependency>