mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-15 00:18:04 +00:00
revert[proxy]: bean should be pojo class
This commit is contained in:
1 parent
06f716feb9
commit
607314a442
7 files changed
+29
-23
No files matched your search
@@ -43,11 +43,15 @@ public class EventRegisterProcessor implements BeanPostProcessor {
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||
var clazz = bean.getClass();
|
||||
var methods = ReflectionUtils.getMethodsByAnnotation(clazz, EventReceiver.class);
|
||||
var methods = ReflectionUtils.getMethodsByAnnoInPOJOClass(clazz, EventReceiver.class);
|
||||
if (ArrayUtils.isEmpty(methods)) {
|
||||
return bean;
|
||||
}
|
||||
|
||||
if (!ReflectionUtils.isPojoClass(clazz)) {
|
||||
logger.warn("The message registration class [{}] is not a POJO class, and the parent class will not be scanned", clazz);
|
||||
}
|
||||
|
||||
try {
|
||||
for (var method : methods) {
|
||||
var paramClazzs = method.getParameterTypes();
|
||||
|
||||
Reference in new issue
Block a user