diff --git a/pom.xml b/pom.xml
index 7b532f6..dc749d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
group.flyfish
rest-proxy
- 1.1.6
+ 1.1.7
8
@@ -22,7 +22,7 @@
1.8
4.4
2.6
- 1.1.6
+ 1.1.7
pom
diff --git a/rest-proxy-api/pom.xml b/rest-proxy-api/pom.xml
index c1c9600..90309c7 100644
--- a/rest-proxy-api/pom.xml
+++ b/rest-proxy-api/pom.xml
@@ -5,7 +5,7 @@
group.flyfish
rest-proxy
- 1.1.6
+ 1.1.7
4.0.0
diff --git a/rest-proxy-core/pom.xml b/rest-proxy-core/pom.xml
index b5e8010..4709d21 100644
--- a/rest-proxy-core/pom.xml
+++ b/rest-proxy-core/pom.xml
@@ -5,7 +5,7 @@
group.flyfish
rest-proxy
- 1.1.6
+ 1.1.7
4.0.0
diff --git a/rest-proxy-core/src/main/java/group/flyfish/rest/registry/RestApiRegistry.java b/rest-proxy-core/src/main/java/group/flyfish/rest/registry/RestApiRegistry.java
index f1c9d73..3fe31a7 100644
--- a/rest-proxy-core/src/main/java/group/flyfish/rest/registry/RestApiRegistry.java
+++ b/rest-proxy-core/src/main/java/group/flyfish/rest/registry/RestApiRegistry.java
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.*;
import org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider;
+import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.lang.NonNull;
@@ -62,7 +63,8 @@ public class RestApiRegistry implements BeanDefinitionRegistryPostProcessor, Bea
// 找基本包,找不到立马报错
beanFactory.getBeansWithAnnotation(EnableRestApiProxy.class)
.forEach((key, value) -> {
- EnableRestApiProxy proxy = value.getClass().getAnnotation(EnableRestApiProxy.class);
+ EnableRestApiProxy proxy = AnnotationUtils.findAnnotation(value.getClass(), EnableRestApiProxy.class);
+ if (null == proxy) return;
for (String basePackage : proxy.basePackages()) {
if (DataUtils.isNotBlank(basePackage)) {
packageNames.add(basePackage);