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

nacos 2023.0.1.3 update error #3898

Open
rayliang123 opened this issue Nov 20, 2024 · 6 comments
Open

nacos 2023.0.1.3 update error #3898

rayliang123 opened this issue Nov 20, 2024 · 6 comments
Labels
area/nacos spring cloud alibaba nacos kind/question

Comments

@rayliang123
Copy link

No description provided.

@rayliang123
Copy link
Author

真的好难用

@rayliang123
Copy link
Author

image
需要在application.yml这样配置,才能成功

@rayliang123
Copy link
Author

后面启动又出现logback问题,要在启动前加入System.setProperty("nacos.logging.default.config.enabled","false");代码

@Comven
Copy link

Comven commented Nov 21, 2024

为什么你这个是在application.yml中配置,我的使用了bootstrap,需要在bootstrap中配置

spring.config.import[0]=nacos:${spring.application.name}?refreshEnabled=true
spring.config.import[1]=nacos:${spring.application.name}.properties?refreshEnabled=true

在bootstrap中配置没有提示logback的问题,测试了下如果把配置改到applicaiton文件中就要加你提到的这个环境变量的代码,否则会报错。现在这个必须使用spring.config.import来显示指定配置中心文件名称的方式的确比原来麻烦了,感觉还是应该保留根据程序名称拉取的方式。

@yuluo-yx
Copy link
Collaborator

看看文档吧 sca.aliyun.com 实在不行看看 example

@yuluo-yx yuluo-yx added kind/question area/nacos spring cloud alibaba nacos labels Nov 21, 2024
@herodotus-ecosystem
Copy link

herodotus-ecosystem commented Nov 25, 2024

看看文档吧 sca.aliyun.com 实在不行看看 example

从现在官网的描述说明 和 SCA 2023.0.1.3 配置中心的表现是有冲突的地方,所以看了文档也会有点迷糊。

  1. 官方文档上提到 自定义 Namespace 配置和 自定义 Group 配置 必须在 bootstrap.yml 文件中配置,实际使用下来,发现定义在 application.yml 中也会生效。
  2. 官网 2023.X 还是有 配置优先级的说明,但 SCA 2023.0.1.3 版本不管采用 bootstrap 还是 application哪种方式配置,shared-dataids 和 ext-config[n].data-id 都是拿不到值的。换句话说 bootstrap.yml/properties 引入配置已经无法支持

#3882

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/nacos spring cloud alibaba nacos kind/question
Projects
None yet
Development

No branches or pull requests

4 participants