From d0ea4d5143dde9efcb407ddc0945a340ce83c158 Mon Sep 17 00:00:00 2001 From: wangyu <727842003@qq.com> Date: Mon, 25 Oct 2021 21:32:28 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=AE=8C=E6=88=90=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/flyfish/framework/beans/meta/BeanProperty.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/flyfish-web/src/main/java/com/flyfish/framework/beans/meta/BeanProperty.java b/flyfish-web/src/main/java/com/flyfish/framework/beans/meta/BeanProperty.java index 8a3f8d2..b7dc810 100644 --- a/flyfish-web/src/main/java/com/flyfish/framework/beans/meta/BeanProperty.java +++ b/flyfish-web/src/main/java/com/flyfish/framework/beans/meta/BeanProperty.java @@ -348,15 +348,14 @@ public class BeanProperty { */ private static List parseExtras(Class clazz, List origin) { List result = new ArrayList<>(); - MergedAnnotations annotations = MergedAnnotations.from(clazz); // 包含properties - if (annotations.isPresent(Properties.class)) { - Properties properties = annotations.get(Properties.class).synthesize(); + if (clazz.isAnnotationPresent(Properties.class)) { + Properties properties = clazz.getAnnotation(Properties.class); for (Property prop : properties.value()) { applyExtraProperty(result, origin, prop); } - } else if (annotations.isPresent(Property.class)) { - applyExtraProperty(result, origin, annotations.get(Property.class).synthesize()); + } else if (clazz.isAnnotationPresent(Property.class)) { + applyExtraProperty(result, origin, clazz.getAnnotation(Property.class)); } return result; }