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