-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
apollo.bootstrap.enabled 实现逻辑有问题 #1826
Comments
springBoot dubbo 启动加载配置OverrideDubboConfigApplicationListener可以参考一下 |
1.2.0版本已经支持了,详见 #1614 |
刚看了,我之前用的是1.1.0;既然logback和dubbo配置加载优先,用一个配置项apollo.bootstrap.enabled不更方便一些嘛。方案一的实现可以通过实现ApplicationEnvironmentPreparedEvent监听,加载顺讯可以设置最高级@order(value = Ordered.HIGHEST_PRECEDENCE) 来解决 |
加载太靠前还是有点副作用的,比如在加载配置的时候没有日志 |
目前1.2.0版本,发现加了apollo.bootstrap.eagerLoad.enabled=true 配置后,如果此时配置中心访问不了,启动时候日志(Sync config failed, will retry. Repository {}, reason: {})就不会输出 |
有没有更好的解决方案,加载太前是有点副作用 |
另一个方案就是类似于spring cloud config,在配置加载后刷新了一下Logging system: |
对于springBoot启动listener启动要早,对于这些需要加载配置,apollo实现原理ApolloApplicationContextInitializer就会加载不到配置项,而是读取项目本身配置
尤其对于springboot dubbo项目,就会出现问题;应该实现逻辑ApplicationListener接口,对PropertyResource进行处理
The text was updated successfully, but these errors were encountered: