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

Spring Cloud Nacos Config 不支持 Spring Boot 2.4.+ 版本吗? #263

Open
dangzhicairang opened this issue Aug 19, 2022 · 1 comment
Open

Comments

@dangzhicairang
Copy link

Spring Cloud Nacos Config 版本:2021.0.1.0(最新版)
Spring Boot 版本:2.7.2(2.4.+)
因为使用的是 2.4.+ 版本的 Spring Boot,同时看到对应的 Spring Cloud Nacos Config 也是实现了 NacosConfigDataLocationResolver 和 NacosConfigDataLoader 的,但是把对应的 nacos 配置放到 application.yaml 文件后发现并不生效
1)是否还需要其他额外的配置没有说明呢
2)还是说只能回退到 bootstrap 的方式启动,实测确实可以,但既然官方实现了 NacosConfigDataLocationResolver 和 NacosConfigDataLoader 应该是不希望回退的吧

希望官方解答下这个问题,谢谢了

@dangzhicairang
Copy link
Author

SpringApplication.run(Demo4nacosApplication.class , "--spring.config.additional-location=nacos:demo4nacos.yaml");
通过指定启动参数勉强可以读取到指定 dataId 的配置,但明显不是本意,也失去了 profile 的能力

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

1 participant