问题
引入了Hystrix发现报红说找不到@HystrixCommand注解,pom文件中已经引入了hystrix依赖。
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix-hystrix</artifactId>
</dependency>
解决方案
需要额外引入hystrix-javanica这个依赖
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-javanica</artifactId>
</dependency>