diff --git a/dubbo-config/dubbo-config-spring6/src/main/java/org/apache/dubbo/config/spring6/beans/factory/annotation/ReferenceAnnotationWithAotBeanPostProcessor.java b/dubbo-config/dubbo-config-spring6/src/main/java/org/apache/dubbo/config/spring6/beans/factory/annotation/ReferenceAnnotationWithAotBeanPostProcessor.java index 971e010e418..0a165b0e156 100644 --- a/dubbo-config/dubbo-config-spring6/src/main/java/org/apache/dubbo/config/spring6/beans/factory/annotation/ReferenceAnnotationWithAotBeanPostProcessor.java +++ b/dubbo-config/dubbo-config-spring6/src/main/java/org/apache/dubbo/config/spring6/beans/factory/annotation/ReferenceAnnotationWithAotBeanPostProcessor.java @@ -261,7 +261,17 @@ private CodeBlock generateStatementForElement( Class c = referenceElement.getInjectedType(); AotUtils.registerSerializationForService(c, hints); hints.reflection().registerType(TypeReference.of(c), MemberCategory.INVOKE_PUBLIC_METHODS); + // need to enumerate all interfaces by the proxy + hints.proxies().registerJdkProxy(c, EchoService.class, Destroyable.class); hints.proxies().registerJdkProxy(c, EchoService.class, Destroyable.class, GenericService.class); + hints.proxies() + .registerJdkProxy( + c, + EchoService.class, + Destroyable.class, + SpringProxy.class, + Advised.class, + DecoratingProxy.class); hints.proxies() .registerJdkProxy( c,