Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
24.08k
stars
4.7k
forks
source link
HystrixCommandAspect doesn't work on proxied classes #1941
Hi.
I found issue in HystrixCommandAspect when it is executed on dynamically proxied class. Namely in method methodsAnnotatedWithHystrixCommand there is method retrieval from joinPoint. It uses AopUtils which executes following line
The problem is with joinPoint.getTarget() because it points to proxy class which doesn't have annotations. The result is nice method reference which doesn't have any annotations on it, including @HystrixCommand. Because of this it fails below on extracting MetaHolderFactory from map.
Perhaps changing this line to following one might solve the issue
Hi. I found issue in HystrixCommandAspect when it is executed on dynamically proxied class. Namely in method
methodsAnnotatedWithHystrixCommand
there is method retrieval from joinPoint. It usesAopUtils
which executes following lineThe problem is with
joinPoint.getTarget()
because it points to proxy class which doesn't have annotations. The result is nice method reference which doesn't have any annotations on it, including@HystrixCommand
. Because of this it fails below on extractingMetaHolderFactory
from map.Perhaps changing this line to following one might solve the issue
Version: spring-cloud-starter-netflix-hystrix v2.0.2 hystrix-javanica 1.5.12