【Spring Cloud】Finchley版本hystrix的@EnableHystrixDashboard註解無法使用解決方法

查閱了相關資料,由於是spring boot 2.0.X版本問題,所以使用

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

代替

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

@EnableHystrixDashboard註解即可使用

@SpringBootApplication
@EnableHystrixDashboard
public class HystrixActuatorServerApplication{

	public static void main( String[] args )
	{
		SpringApplication.run(HystrixActuatorServerApplication.class,args);
	}
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章