0
点赞
收藏
分享

微信扫一扫

引入了Hystrix依赖却找不到@HystrixCommand注解

松鼠树屋 2022-06-03 阅读 86

问题引入

今天在按照视频学习Spring Cloud Hystrix时,发现报红说找不到@HystrixCommand注解,pom文件中已经引入了hystrix依赖。

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

解决

上网查阅相关资料后发现需要额外引入依赖hystrix-javanica,在pom文件文件新引入如下依赖即可。

<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-javanica</artifactId>
</dependency>

 


举报

相关推荐

0 条评论