Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HystrixCommand only works with Spring Service or Component?

Does Spring Hystrix only work with @Service and @Component?

I had a class that was defined as a @RestController and my HystrixCommand would not fire, the method would execute but not behave as a HystrixCommand. When I made a @Service class and put the HystrixCommand method and fallback into it the HystrixCommand would work properly.

What are the appropriate Spring annotations that can be used with @EnableHystrix?

like image 627
Rick Horan Avatar asked Oct 20 '22 04:10

Rick Horan


1 Answers

For now, you described the appropriate places. We have an open issue that mentions support for controllers.

like image 69
spencergibb Avatar answered Oct 22 '22 01:10

spencergibb