Spring cloud中整合Hystrix時(shí)迷殿,無法識別@HystrixCommand標(biāo)簽蚜印,項(xiàng)目的Hystrix依賴為:
<dependency>
? ? ? <groupId>org.springframework.cloud</groupId>
? ? ? <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
查了一下豫喧,@HystrixCommand注解是由名為javanica的Hystrix contrib庫提供的遭赂。javanica是一個(gè)Hystrix的子項(xiàng)目摘符,用于簡化Hystrix的使用抢野。所以拷淘,還需要添加一個(gè)依賴:
<dependency>
? <groupId>com.netflix.hystrix</groupId>
? <artifactId>hystrix-javanica</artifactId>
? <version>RELEASE</version>
</dependency>