使用的版本
<properties>
<java.version>1.8</java.version>
<spring-boot.version>1.4.0.RELEASE</spring-boot.version>
<spring.version>4.3.25.RELEASE</spring.version>
<dubbo.version>2.6.8</dubbo.version>
<dubbo.spring-boot.version>0.1.2.RELEASE</dubbo.spring-boot.version>
<nacos.version>1.0.0</nacos.version>
</properties>
配置信息:
`spring:
application:
name: v5-ctp-organization
dubbo:
protocol:
id: dubbo
name: dubbo
port: 20880
host: 10.6.5.117
application:
name: ${spring.application.name}
id: ${spring.application.name}
registry:
timeout: 3000
address: nacos://localhost:8888
username: nacos
password: nacos
id: ${spring.application.name}-registry`
启动报错
Caused by: java.lang.IllegalStateException: Invalid name="com.alibaba.dubbo.config.ApplicationConfig#0" contains illegal character, only digit, letter, '-', '_' or '.' is legal.
at com.alibaba.dubbo.config.AbstractConfig.checkProperty(AbstractConfig.java:396) ~[dubbo-2.6.8.jar:2.6.8]
at com.alibaba.dubbo.config.AbstractConfig.checkName(AbstractConfig.java:354) ~[dubbo-2.6.8.jar:2.6.8]
at com.alibaba.dubbo.config.ApplicationConfig.setName(ApplicationConfig.java:99) ~[dubbo-2.6.8.jar:2.6.8]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216) ~[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at com.alibaba.dubbo.config.spring.context.config.NamePropertyDefaultValueDubboConfigBeanCustomizer.customize(NamePropertyDefaultValueDubboConfigBeanCustomizer.java:65) ~[dubbo-2.6.8.jar:2.6.8]
at com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor.customize(DubboConfigBindingBeanPostProcessor.java:109) ~[dubbo-2.6.8.jar:2.6.8]
at com.alibaba.dubbo.config.spring.beans.factory.annotation.DubboConfigBindingBeanPostProcessor.postProcessBeforeInitialization(DubboConfigBindingBeanPostProcessor.java:91) ~[dubbo-2.6.8.jar:2.6.8]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 15 common frames omitted
Pls. provide [GitHub address] to reproduce this issue.
正常启动
无法启动项目
If there is an exception, please attach the exception trace:
Just put your stack trace here!
referenceBean提前初始化问题
解决方式非常的简单,来参考https://github.com/open-wrapper/dubbo-wrapper
I remember this has been fixed in dubbo-spring-boot-starter
@mercyblitz would please hep to see which dubbo-boot version is compatible with 2.6.8 and has this bug fixed?
same issue
contains illegal character, only digit, letter, '-', '_' or '.' is legal
dubbo-spring-boot-starter:2.7.7
解决方式非常的简单,来参考https://github.com/open-wrapper/dubbo-wrapper
只有代码看不出怎么处理的
<properties>
<dubbo.version>2.7.8</dubbo.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo</artifactId>
<version>${dubbo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-dependencies-zookeeper</artifactId>
<version>${dubbo.version}</version>
<type>pom</type>
</dependency>
</dependencies>
I fixed this problem by removing the old 'spring.' prefix
dubbo.application.name=xx
...