Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

springboot整合dubbo 0.2.0,其中使用了占位符不生效问题 ${} #544

Open
yuyu414 opened this issue Jul 15, 2019 · 5 comments
Open

Comments

@yuyu414
Copy link

yuyu414 commented Jul 15, 2019

我使用的是springboot2.1.15对应dubbo0.2.0,其中使用了外部的配置文件@propertysource("file:D:/opt/config/taskcenter/a.properties"),占位符${},发现dubbo加载的时候不会把占位符转换为我要的参数,如何是好?

@yuyu414
Copy link
Author

yuyu414 commented Jul 15, 2019

看了源码,发现确实对占位符没有做处理

@JsonSong89
Copy link


@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
}

现在只能用这种中二写法了.

@JsonSong89
Copy link

发现还有其他问题
然后我回滚到2.6.7又有问题,
我老老实实滚回2.6.5
惹不起,我还是等2.8出来了再升2.7吧

@mercyblitz
Copy link
Contributor

Did you have some code?

@chenws1012
Copy link

chenws1012 commented Nov 19, 2021

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants