You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/09/21 15:52:47 UTC

[dubbo] branch master updated: fix #8770: provider remove @Lazy support. (#8854)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 6dc1730  fix #8770: provider remove @Lazy support. (#8854)
6dc1730 is described below

commit 6dc17306957524c48df1798856d376c43b04cfeb
Author: changfu <ch...@gmail.com>
AuthorDate: Tue Sep 21 23:51:48 2021 +0800

    fix #8770: provider remove @Lazy support. (#8854)
---
 .../beans/factory/annotation/ServiceClassPostProcessor.java      | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceClassPostProcessor.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceClassPostProcessor.java
index 7997fc1..5fc1582 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceClassPostProcessor.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceClassPostProcessor.java
@@ -49,7 +49,6 @@ import org.springframework.context.annotation.AnnotationBeanNameGenerator;
 import org.springframework.context.annotation.AnnotationConfigUtils;
 import org.springframework.context.annotation.ClassPathBeanDefinitionScanner;
 import org.springframework.context.annotation.ConfigurationClassPostProcessor;
-import org.springframework.context.annotation.Lazy;
 import org.springframework.core.annotation.AnnotationAttributes;
 import org.springframework.core.env.Environment;
 import org.springframework.core.io.ResourceLoader;
@@ -289,13 +288,7 @@ public class ServiceClassPostProcessor implements BeanDefinitionRegistryPostProc
 
         AbstractBeanDefinition serviceBeanDefinition =
                 buildServiceBeanDefinition(service, serviceAnnotationAttributes, interfaceClass, annotatedServiceBeanName);
-        /**
-         * Supports {@link Lazy} annotation
-         * */
-        Lazy lazyAnnotation = beanClass.getAnnotation(Lazy.class);
-        if (lazyAnnotation != null) {
-            serviceBeanDefinition.setLazyInit(lazyAnnotation.value());
-        }
+
         // ServiceBean Bean name
         String beanName = generateServiceBeanName(serviceAnnotationAttributes, interfaceClass);