-
-
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
Support apollo config injection in Spring Boot bootstrap phase #937
Conversation
2. Reorganize the feature to provide the ability to inject apollo configs in Spring Boot bootstrap phase 3. Add more integration tests to cover different scenarios 4. Update apollo-demo to show this apollo bootstrap config feature could be used with @ConditionalOnProperty
Codecov Report
@@ Coverage Diff @@
## master #937 +/- ##
============================================
- Coverage 50.48% 46.91% -3.57%
- Complexity 810 1554 +744
============================================
Files 175 354 +179
Lines 4887 9755 +4868
Branches 472 968 +496
============================================
+ Hits 2467 4577 +2110
- Misses 2221 4835 +2614
- Partials 199 343 +144
Continue to review full report at Codecov.
|
logger.debug("Apollo bootstrap config is not enabled for context {}, see property: ${{}}", context, PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED); | ||
return; | ||
} | ||
logger.debug("Apollo bootstrap config is enabled for context {}", context, PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这句日志少了一个大括号{}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
。。。这个日志不需要传PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED
这个参数。。。可以提个PR改一下。。。或者晚点我改一下也行
Some cases like
@ConditionalOnProperty
use the config values earlier than the phase when Apollo configs are injected(postProcessBeanFactory
), so a new way to inject the Apollo config in Spring Boot bootstrap phase is provided.Configuration example:
or