springboot升级 Cannot define alias ‘*‘ for name ‘org.apache.dubbo.config.ApplicationConfig#0‘

Spring Boot Version: 2.3.4.RELEASE (v2.3.4.RELEASE)

[INFO ] 2020-11-19 16:20:11.514 [main] | [cn.com.redis.service.EsgccRedisServiceApplication.logStarting:55] Starting EsgccRedisServiceApplication v1.0.1-SNAPSHOT on linuxserver-2.116 with PID 15419 (/opt//-redis-service/-redis-service-1.0.1-SNAPSHOT.jar started by  in /opt//-redis-service)
[INFO ] 2020-11-19 16:20:11.522 [main] | [cn.com.redis.service.EsgccRedisServiceApplication.logStartupProfileInfo:655] The following profiles are active: yqtest
SHOT on linuxserver-2.116 with PID 15419 (/opt//-redis-service/-redis-service-1.0.1-SNAPSHOT.jar started by  in /opt//-redis-service)
[INFO ] 2020-11-19 16:20:11.522 [main] | [cn.com.redis.service.EsgccRedisServiceApplication.logStartupProfileInfo:655] The following profiles are active: yqtest
autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=nullwith name [referenceAnnotationBeanPostProcessor] has been registered.
[INFO ] 2020-11-19 16:20:14.201 [main] | [com.alibaba.spring.util.BeanRegistrar.registerInfrastructureBean:67] The Infrastructure bean definition [Root bean: class [org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigAliasPostProcessor]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null;initMethodName=null; destroyMethodName=nullwith name [dubboConfigAliasPostProcessor] has been registered.
[INFO ] 2020-11-19 16:20:14.204 [main] | [com.alibaba.spring.util.BeanRegistrar.registerInfrastructureBean:67] The Infrastructure bean definition [Root bean: class [org.apache.dubbo.config.spring.context.DubboLifecycleComponentApplicationListener]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=nullwith name [dubboLifecycleComponentApplicationListener] has beenregistered.
[INFO ] 2020-11-19 16:20:14.205 [main] | [com.alibaba.spring.util.BeanRegistrar.registerInfrastructureBean:67] The Infrastructure bean definition [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=nullwith name [dubboBootstrapApplicationListener] has been registered.
[INFO ] 2020-11-19 16:20:14.207 [main] | [com.alibaba.spring.util.BeanRegistrar.registerInfrastructureBean:67] The Infrastructure bean definition [Root bean: class [org.apache.dubbo.config.spring.beans.factory.config.DubboConfigDefaultPropertyValueBeanPostProcessor]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=nullwith name [dubboConfigDefaultPropertyValueBeanPostProcessor] has been registered.
[INFO ] 2020-11-19 16:20:14.207 [main] | [com.alibaba.spring.util.BeanRegistrar.registerInfrastructureBean:67] The Infrastructure bean definition [Root bean: class [org.apache.dubbo.config.spring.beans.factory.config.DubboConfigDefaultPropertyValueBeanPostProcessor]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=nullwith name [dubboConfigDefaultPropertyValueBeanPostProcessor] has been registered.
[INFO ] 2020-11-19 16:20:14.994 [main] | [org.springframework.data.repository.config.RepositoryConfigurationDelegate.multipleStoresDetected:249] Multiple Spring Data modules found, entering strict repository configuration mode!
[INFO ] 2020-11-19 16:20:15.000 [main] | [org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn:127] Bootstrapping Spring Data Redis repositories in DEFAULT mode.
[INFO ] 2020-11-19 16:20:15.109 [main] | [org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn:187] Finished Spring Data repository scanning in 39ms. Found 0 Redis repository interfaces.
9 16:20:15.878 [main] | [com.alibaba.spring.util.BeanRegistrar.registerInfrastructureBean:67] The Infrastructure bean definition [Root bean: class [com.alibaba.spring.beans.factory.annotation.ConfigurationBeanBindingPostProcessor]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null;destroyMethodName=nullwith name [configurationBeanBindingPostProcessor] has been registered.
[INFO ] 2020-11-19 16:20:15.879 [main] | [com.alibaba.spring.beans.factory.annotation.ConfigurationBeanBindingRegistrar.registerConfigurationBean:139] The configuration bean definition [name : org.apache.dubbo.config.RegistryConfig#0, content : Root bean: class [org.apache.dubbo.config.RegistryConfig]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] has been registered.
[INFO ] 2020-11-19 16:20:15.879 [main] | [com.alibaba.spring.beans.factory.annotation.ConfigurationBeanBindingRegistrar.registerConfigurationBean:139] The configuration bean definition [name : org.apache.dubbo.config.ProtocolConfig#0, content : Root bean: class [org.apache.dubbo.config.ProtocolConfig]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] has been registered.
[INFO ] 2020-11-19 16:20:15.880 [main] | [com.alibaba.spring.beans.factory.annotation.ConfigurationBeanBindingRegistrar.registerConfigurationBean:139] The configuration bean definition [name : org.apache.dubbo.config.ProviderConfig#0, content : Root bean: class [org.apache.dubbo.config.ProviderConfig]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] has been registered.
] has been registered.
[INFO ] 2020-11-19 16:20:15.880 [main] | [com.alibaba.spring.beans.factory.annotation.ConfigurationBeanBindingRegistrar.registerConfigurationBean:139] The configuration bean definition [name : org.apache.dubbo.config.ProviderConfig#0, content : Root bean: class [org.apache.dubbo.config.ProviderConfig]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] has been registered.
log4j:WARN No appenders could be found for logger (org.apache.dubbo.common.logger.LoggerFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO ] 2020-11-19 16:20:17.144 [main] | [org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker.postProcessAfterInitialization:335] Bean 'redisConfig' of type [cn.com.redis.service.config.RedisConfig$$EnhancerBySpringCGLIB$$8bb5bf15] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 2020-11-19 16:20:19.039 [main] | [org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize:108] Tomcat initialized with port(s): 21318 (http)
[INFO ] 2020-11-19 16:20:19.130 [main] | [org.apache.coyote.http11.Http11NioProtocol.log:173] Initializing ProtocolHandler ["http-nio-21318"]
[INFO ] 2020-11-19 16:20:19.131 [main] | [org.apache.catalina.core.StandardService.log:173] Starting service [Tomcat]
[INFO ] 2020-11-19 16:20:19.132 [main] | [org.apache.catalina.core.StandardEngine.log:173] Starting Servlet engine: [Apache Tomcat/9.0.38]
[INFO ] 2020-11-19 16:20:19.459 [main] | [org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].log:173] Initializing Spring embedded WebApplicationContext
[INFO ] 2020-11-19 16:20:19.460 [main] | [org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.prepareWebApplicationContext:285] Root WebApplicationContext: initialization completed in 7770 ms
[INFO ] 2020-11-19 16:20:24.397 [main] | [org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.initialize:181] Initializing ExecutorService 'applicationTaskExecutor'
[INFO ] 2020-11-19 16:20:27.819 [main] | [com.alibaba.spring.beans.factory.annotation.ConfigurationBeanBindingPostProcessor.initConfigurationBeanBinder:170] configurationBeanBinder Bean can't be found in ApplicationContext.
[INFO ] 2020-11-19 16:20:27.837 [main] | [org.apache.dubbo.common.logger.LoggerFactory.?:?] using logger: org.apache.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
s one default ApplicationConfig or more than two ApplicationConfigs have the same id, you can try to give each ApplicationConfig a different id : <dubbo:application logger="slf4j" hostname="linuxserver-2.116" name="-redis-service" />, dubbo version: 2.7.8, current host: 172.16.2.116
[WARN ] 2020-11-19 16:20:27.921 [main] | [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.refresh:559] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.dubbo.config.ApplicationConfig#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot define alias '-redis-service' for name 'org.apache.dubbo.config.ApplicationConfig#0': It is already registered for name 'applicationConfig'.
[WARN ] 2020-11-19 16:20:27.921 [main] | [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.refresh:559] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.dubbo.config.ApplicationConfig#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot define alias '-redis-service' for name 'org.apache.dubbo.config.ApplicationConfig#0': It is already registered for name 'applicationConfig'.
[INFO ] 2020-11-19 16:20:27.936 [main] | [org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.shutdown:218] Shutting down ExecutorService 'applicationTaskExecutor'
[INFO ] 2020-11-19 16:20:27.963 [main] | [org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.destroy:304] class org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!
[INFO ] 2020-11-19 16:20:27.967 [main] | [org.apache.catalina.core.StandardService.log:173] Stopping service [Tomcat]
[INFO ] 2020-11-19 16:20:28.065 [main] | [org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener.logMessage:136]

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
wireCapableBeanFactory.java:602)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
    at cn.com.redis.service.EsgccRedisServiceApplication.main(EsgccRedisServiceApplication.java:13)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: java.lang.IllegalStateException: Cannot define alias '-redis-service' for name 'org.apache.dubbo.config.ApplicationConfig#0': It is already registered for name 'applicationConfig'.
    at org.springframework.core.SimpleAliasRegistry.registerAlias(SimpleAliasRegistry.java:71)
    at org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigAliasPostProcessor.postProcessAfterInitialization(DubboConfigAliasPostProcessor.java:69)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:430)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1798)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
    .. 24 common frames omitted
[ERROR] 2020-11-19 16:20:28.093 [main] | [org.springframework.boot.SpringApplication.reportFailure:837] Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.dubbo.config.ApplicationConfig#0': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot define alias '-redis-service' for name 'org.apache.dubbo.config.ApplicationConfig#0': It is already registered for name 'applicationConfig'.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
    at cn.com.redis.service.EsgccRedisServiceApplication.main(EsgccRedisServiceApplication.java:13)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: java.lang.IllegalStateException: Cannot define alias '*' for name 'org.apache.dubbo.config.ApplicationConfig#0': It is already registered for name 'applicationConfig'.
    at org.springframework.core.SimpleAliasRegistry.registerAlias(SimpleAliasRegistry.java:71)
    at org.apache.dubbo.config.spring.beans.factory.annotation.DubboConfigAliasPostProcessor.postProcessAfterInitialization(DubboConfigAliasPostProcessor.java:69)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:430)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1798)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
    .. 24 common frames omitted
[INFO ] 2020-11-19 16:20:28.117 [DubboShutdownHook] | [org.apache.dubbo.config.DubboShutdownHook.run:70]  [DUBBO] Run shutdown hook now., dubbo version: 2.7.8, current host: 172.16.2.116
[INFO ] 2020-11-19 16:20:28.144 [DubboShutdownHook] | [org.apache.dubbo.registry.support.AbstractRegistryFactory.destroyAll:81]  [DUBBO] Close all registries [], dubbo version: 2.7.8, current host: 172.16.2.116
[INFO ] 2020-11-19 16:20:28.148 [DubboShutdownHook] | [org.apache.dubbo.config.event.listener.LoggingEventListener.onEvent:42]  [DUBBO] Dubbo Service has been destroyed., dubbo version: 2.7.8, current host: 172.16.2.116

解决方法:
在这里插入图片描述
添加

spring:
  main:
    allow-bean-definition-overriding: true
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值