dubbo
dubbo copied to clipboard
2.7.6和2.7.7的DubboBootstrapApplicationListener重复注册导致无法启动
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
- [ ] I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
- Dubbo version: 2.7.6/2.7.7
- Operating System version: Windows 10
- Java version: 1.8
Steps to reproduce this issue
- 从2.7.4.1升级到2.7.6或者2.7.7
- 启动服务提供者
- 提示无法启动,DubboBootstrapApplicationListener重复注册
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
正常启动
Actual Result
无法启动,抛出异常,DubboBootstrapApplicationListener重复注册
If there is an exception, please attach the exception trace:
2020-05-30 23:30:40.991 [main] WARN [AbstractApplicationContext:558] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'dubboBootstrapApplicationListener' defined in null: Cannot register bean definition [Generic bean: class [org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener]; scope=singleton; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] for bean 'dubboBootstrapApplicationListener': There is already [Root bean: class [org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] bound.
2020-05-30 23:30:41.005 [main] INFO [ConditionEvaluationReportLoggingListener:136] -
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-05-30 23:30:41.009 [main] ERROR [LoggingFailureAnalysisReporter:40] -
APPLICATION FAILED TO START
Description:
The bean 'dubboBootstrapApplicationListener' could not be registered. A bean with that name has already been defined and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
我也碰到了,希望官方可以看到
你用的dubbo-spring-boot-project吗?
fixd in #6253