dubbo-spring-boot-project
dubbo-spring-boot-project copied to clipboard
springboot整合dubbo 0.2.0,其中使用了占位符不生效问题 ${}
trafficstars
我使用的是springboot2.1.15对应dubbo0.2.0,其中使用了外部的配置文件@PropertySource("file:D:/opt/config/taskcenter/a.properties"),占位符${},发现dubbo加载的时候不会把占位符转换为我要的参数,如何是好?
看了源码,发现确实对占位符没有做处理
@Configuration
class DubboConfig {
@Profile("local")
@ImportResource(locations = ["classpath:dubbo/dubbo-local.xml"])
class LocalConfig
@Profile("test")
@ImportResource(locations = ["classpath:dubbo/dubbo-test.xml"])
class TestConfig
@Profile("pro")
@ImportResource(locations = ["classpath:dubbo/dubbo-pro.xml"])
class ProConfig
}
现在只能用这种中二写法了.
发现还有其他问题 然后我回滚到2.6.7又有问题, 我老老实实滚回2.6.5 惹不起,我还是等2.8出来了再升2.7吧
Did you have some code?
0.2.1.RELEASE has fixed it.
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>dubbo-spring-boot-starter</artifactId>
<version>0.2.1.RELEASE</version>
</dependency>