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

I hope that one of shared-dataids and ext-config can support profile recognition. #978

Closed
somowhere opened this issue Oct 6, 2019 · 3 comments

Comments

@somowhere
Copy link

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。
We recommend using English. If you are non-native English speaker, you can use the translation software.

Which Component
eg. Nacos Config

Is your feature request related to a problem? Please describe.
Microservices load the same public configuration can only be hard coded

Describe the solution you'd like
I hope that one of shared-dataids and ext-config can support profile recognition.

Describe alternatives you've considered
在 com.alibaba.cloud.nacos.NacosConfigProperties.Config 中增加是否启用profile属性,然后在NacosPropertySourceLocator.loadExtConfiguration 读取注入profile
Add whether to enable the profile attribute in com.alibaba.cloud.nacos.NacosConfigProperties.Config and then read the injection profile in NacosPropertySourceLocator.loadExtConfiguration

@zkzlx
Copy link
Collaborator

zkzlx commented Oct 8, 2019

Thank you for your suggestion.But I think you can override it with an application-level configuration

@zkzlx
Copy link
Collaborator

zkzlx commented Oct 8, 2019

Configure load order : shared -> extensional -> application(default) ->application(suffix) -> application(profile).
There is therefore a priority for configuration items .
The order of priorities is the reverse of the loading order.

@fangjian0423
Copy link
Contributor

Yes, different configurations have different order, refer https://github.com/alibaba/spring-cloud-alibaba/wiki/Nacos-config#%E9%85%8D%E7%BD%AE%E7%9A%84%E4%BC%98%E5%85%88%E7%BA%A7

Refer the order of Spring Boot Externalized Configuration: https://stackoverflow.com/a/25862357

zkzlx added a commit to zkzlx/spring-cloud-alibaba that referenced this issue Dec 18, 2019
zkzlx added a commit to zkzlx/spring-cloud-alibaba that referenced this issue Jan 7, 2020
fangjian0423 added a commit that referenced this issue Jan 7, 2020
[issue #982 & issue #978]enhance nacos config
theonefx pushed a commit to theonefx/spring-cloud-alibaba that referenced this issue Aug 2, 2021
theonefx pushed a commit to theonefx/spring-cloud-alibaba that referenced this issue Aug 2, 2021
theonefx pushed a commit to theonefx/spring-cloud-alibaba that referenced this issue Aug 2, 2021
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

3 participants