You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/06 02:49:30 UTC

[GitHub] [dubbo] Intangiblemoon opened a new issue, #10277: ApplicationConfig 提前加载导致的 org.apache.dubbo.config.ApplicationConfig#0: defined in null

Intangiblemoon opened a new issue, #10277:
URL: https://github.com/apache/dubbo/issues/10277

   求问题验证解决思路
   
   现象所在 version:2.7.15
   
   在2.7.3中使用如下方法注入bean是可以成功的
   ```java
   @Configuration
   @RequiredArgsConstructor
   @EnableConfigurationProperties({A.class, B.class})
   public class DubboBaseAutoConfig implements InitializingBean{
       @Bean
       @Primary
       @ConditionalOnMissingBean(ApplicationConfig.class)
       public ApplicationConfig applicationConfig()
   ```
   然而在2.7.15中会出现这样的错误
   ```
   
   ***************************
   APPLICATION FAILED TO START
   ***************************
   
   Description:
   
   Parameter 3 of constructor in com.demo.web.impl.ServiceImpl required a single bean, but 2 were found:
   	- applicationConfig: defined by method 'applicationConfig' in class path resource [com/demo/starter/dubbo/support/DubboBaseAutoConfig.class]
   	- org.apache.dubbo.config.ApplicationConfig#0: defined in null
   
   ```
   怀疑是提前实例化导致在
   ```
   org.springframework.context.support.AbstractApplicationContext#finishBeanFactoryInitialization
   ```
   实例化的时候,存在两个``` org.apache.dubbo.config.ApplicationConfig#0 ```导致的问题
   
   想找个方法验证猜想并解决问题,却没有什么头绪。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ commented on issue #10277: ApplicationConfig 提前加载导致的 org.apache.dubbo.config.ApplicationConfig#0: defined in null

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #10277:
URL: https://github.com/apache/dubbo/issues/10277#issuecomment-1309843487

   Please try upgrade to 3.1.2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] huangttt18 commented on issue #10277: ApplicationConfig 提前加载导致的 org.apache.dubbo.config.ApplicationConfig#0: defined in null

Posted by GitBox <gi...@apache.org>.
huangttt18 commented on issue #10277:
URL: https://github.com/apache/dubbo/issues/10277#issuecomment-1308711935

   请问这个问题有解决方吗


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org