|
|
@@ -10,6 +10,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.lang.annotation.Annotation;
|
|
|
import java.lang.reflect.Method;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
@@ -40,15 +41,18 @@ public class ScanExecuteService {
|
|
|
String className = CommonUtil.toFirstCharLowerCase(cls.getSimpleName());
|
|
|
Method[] methods = cls.getMethods();
|
|
|
for (Method method : methods) {
|
|
|
- if (method.isAnnotationPresent(ExecuteAnnotationServiceMethod.class)) {
|
|
|
- String methodName = method.getName();
|
|
|
- ExecuteAnnotationServiceMethod t = method.getAnnotation(ExecuteAnnotationServiceMethod.class);
|
|
|
- ExecuteMethodInfo methodInfo = new ExecuteMethodInfo();
|
|
|
- methodInfo.setMethodName(methodName);
|
|
|
- methodInfo.setBeanName(className);
|
|
|
- methodInfo.setEvent(t.value());
|
|
|
- methodInfo.setRemark(t.remark());
|
|
|
- list.add(methodInfo);
|
|
|
+ Annotation[] annotations = method.getAnnotations();
|
|
|
+ for(Annotation annotation : annotations) {
|
|
|
+ if (annotation instanceof ExecuteAnnotationServiceMethod) {
|
|
|
+ String methodName = method.getName();
|
|
|
+ ExecuteAnnotationServiceMethod t = method.getAnnotation(ExecuteAnnotationServiceMethod.class);
|
|
|
+ ExecuteMethodInfo methodInfo = new ExecuteMethodInfo();
|
|
|
+ methodInfo.setMethodName(methodName);
|
|
|
+ methodInfo.setBeanName(className);
|
|
|
+ methodInfo.setEvent(t.value());
|
|
|
+ methodInfo.setRemark(t.remark());
|
|
|
+ list.add(methodInfo);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|