Does HystrixCommand only work with Spring service or component?

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

I had a class that was defined as @RestController, and my HystrixCommand did not work, this method executed, but did not behave like a HystrixCommand. When I created the @Service class and placed the HystrixCommand method and returned to it, the HystrixCommand will work correctly.

What are the relevant Spring annotations you can use with @EnableHystrix?

+4
source share
1 answer

So far you have described suitable places. We have an open issue that mentions controller support.

+3
source

All Articles