Spring Hystrix是否仅与@Service和@Component一起使用?
我有一个定义为@RestController的类,并且我的HystrixCommand无法启动,该方法可以执行,但不能充当HystrixCommand。当我创建一个@Service类并放入HystrixCommand方法并回退到其中时,HystrixCommand将正常运行。
可与@EnableHystrix一起使用的适当的Spring注释是什么?
spring netflix hystrix spring-cloud
hystrix ×1
netflix ×1
spring ×1
spring-cloud ×1