fix[proxy]: the annotations of the bean of the parent class cannot be scanned

This commit is contained in:
sun
2023-01-16 19:11:19 +08:00
parent e2522ac333
commit 06f716feb9
5 changed files with 6 additions and 28 deletions
@@ -63,15 +63,11 @@ public abstract class PacketBus {
public static void registerPacketReceiverDefinition(Object bean) {
var clazz = bean.getClass();
var methods = ReflectionUtils.getMethodsByAnnoInPOJOClass(clazz, PacketReceiver.class);
var methods = ReflectionUtils.getMethodsByAnnotation(clazz, PacketReceiver.class);
if (ArrayUtils.isEmpty(methods)) {
return;
}
if (!ReflectionUtils.isPojoClass(clazz)) {
logger.warn("The message registration class [{}] is not a POJO class, and the parent class will not be scanned", clazz);
}
for (var method : methods) {
var paramClazzs = method.getParameterTypes();