-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Update ApolloApplicationContextInitializer.java #37
Conversation
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
This change was introduced in apolloconfig/apollo#1614, would you please help to first check that pr and verify what the impact is? |
I have read the CLA Document and I hereby sign the CLA |
I check logic if I want get APOLLO_SYSTEM_PROPERTIES meta-data from spring-cloud-config. So I need retry to execute if apollo system properties already been initialized, it doesn't affect system property when we re-execute initializeSystemProperty ` private void fillSystemPropertyFromEnvironment(ConfigurableEnvironment environment, String propertyName) {
}` |
Codecov Report
@@ Coverage Diff @@
## main #37 +/- ##
============================================
+ Coverage 68.35% 68.59% +0.23%
- Complexity 1193 1206 +13
============================================
Files 169 171 +2
Lines 5161 5197 +36
Branches 561 561
============================================
+ Hits 3528 3565 +37
- Misses 1369 1371 +2
+ Partials 264 261 -3
|
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.
Can we add some unit tests to verify this logic and prevent it from being mistakenly modified in the future?
BTW, please also update the CHANGES.md.
...rc/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java
Outdated
Show resolved
Hide resolved
ok |
What's the purpose of this PR
#36
Which issue(s) this PR fixes:
Fixes #
I want fix
when we use spring-cloud-config to config app.id and apollo.meta apollo.cluster
the app.id is ApolloNoAppIdPlaceHolder
Brief changelog
support spring-cloud-config to config APOLLO_SYSTEM_PROPERTIES
public static final String[] APOLLO_SYSTEM_PROPERTIES = {ApolloClientSystemConsts.APP_ID,
ApolloClientSystemConsts.APOLLO_LABEL,
ApolloClientSystemConsts.APOLLO_CLUSTER,
ApolloClientSystemConsts.APOLLO_CACHE_DIR,
ApolloClientSystemConsts.APOLLO_ACCESS_KEY_SECRET,
ApolloClientSystemConsts.APOLLO_META,
ApolloClientSystemConsts.APOLLO_CONFIG_SERVICE,
ApolloClientSystemConsts.APOLLO_PROPERTY_ORDER_ENABLE,
ApolloClientSystemConsts.APOLLO_PROPERTY_NAMES_CACHE_ENABLE,
ApolloClientSystemConsts.APOLLO_OVERRIDE_SYSTEM_PROPERTIES};