Polish spring-cloud-incubator/spring-cloud-alibaba/#626
@@ -91,8 +91,8 @@ public class SentinelInvocationHandler implements InvocationHandler {
if (target instanceof Target.HardCodedTarget) {
Target.HardCodedTarget hardCodedTarget = (Target.HardCodedTarget) target;
MethodMetadata methodMetadata = SentinelContractHolder.metadataMap
- .get(method.getDeclaringClass().getName()
- + Feign.configKey(method.getDeclaringClass(), method));
+ .get(hardCodedTarget.type().getName()
+ + Feign.configKey(hardCodedTarget.type(), method));
// resource default is HttpMethod:protocol://url
String resourceName = methodMetadata.template().method().toUpperCase() + ":"
+ hardCodedTarget.url() + methodMetadata.template().path();
