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

新版本使用 import 加载配置时,spring.cloud.nacos.config相关配置只能在bootstrap才会生效,其他文件不生效 #3933

Open
zxuanhong opened this issue Jan 8, 2025 · 0 comments

Comments

@zxuanhong
Copy link

Describe the bug

  1. 新版本使用 import 加载配置时,spring.cloud.nacos.config相关配置只能在bootstrap才会生效,其他文件不生效
  2. 比如我把以下配置弄在application.yml文件时,nacos 拉取不到**-dev.yml的配置文件,提示没有。但是放在bootstrap.yml 中能成功拉取到**-dev.yml 的配置文件
spring:
  cloud:
    nacos:
      config:
        namespace: dev
  1. 具体视频如下
iShot_2025-01-08_16.56.59.mp4

Additional context
system: mac
jdk: java21
spring-cloud-alibaba: 2023.0.3.2

@zxuanhong zxuanhong changed the title 新版本使用 import 加载配置是,spring.cloud.nacos.config相关配置只能在bootstrap才会生效,其他文件不生效 新版本使用 import 加载配置时,spring.cloud.nacos.config相关配置只能在bootstrap才会生效,其他文件不生效 Jan 8, 2025
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