diff --git a/src/main/java/com/loafle/overflow/container/service/Service.java b/src/main/java/com/loafle/overflow/container/service/Service.java index a5576a9..ea1bc9e 100644 --- a/src/main/java/com/loafle/overflow/container/service/Service.java +++ b/src/main/java/com/loafle/overflow/container/service/Service.java @@ -16,6 +16,7 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; +import org.springframework.core.annotation.AnnotationUtils; import org.springframework.stereotype.Component; /** @@ -74,7 +75,7 @@ public class Service implements InitializingBean, ApplicationContextAware { } private String getRPCMethodName(Method method) { - ProbeAPI a = method.getAnnotation(ProbeAPI.class); + ProbeAPI a = AnnotationUtils.findAnnotation(method, ProbeAPI.class); if (null == a) { return null; }