-
-
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
Lazy load ConfigUtil #3864
Lazy load ConfigUtil #3864
Conversation
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized, That is too early. This issue caused by commit 6d50ca8
Codecov Report
@@ Coverage Diff @@
## master #3864 +/- ##
============================================
- Coverage 50.18% 50.14% -0.05%
+ Complexity 2468 2464 -4
============================================
Files 483 483
Lines 14921 14921
Branches 1520 1520
============================================
- Hits 7488 7482 -6
- Misses 6908 6910 +2
- Partials 525 529 +4
Continue to review full report at Codecov.
|
since #3800 introduced, Spring Boot project start failed with
|
@@ -62,7 +62,7 @@ | |||
|
|||
private final ConfigPropertySourceFactory configPropertySourceFactory = SpringInjector | |||
.getInstance(ConfigPropertySourceFactory.class); | |||
private final ConfigUtil configUtil = ApolloInjector.getInstance(ConfigUtil.class); | |||
private ConfigUtil configUtil; |
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.
Is it necessary to change this logic too? I noticed this line of code was introduced 3 years ago..
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.
currently it's ok if we keep the origin logic, but i thinks it's more safe if we will make this change
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.
LGTM
prevent ConfigUtil init when ApolloApplicationContextInitializer initialized,
That is too early.
This issue caused by commit 6d50ca8
What's the purpose of this PR
XXXXX
Which issue(s) this PR fixes:
Fixes #
Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.