Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
apollo
Commits
9f1264f2
Commit
9f1264f2
authored
Mar 15, 2020
by
Jason Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Modify the logic to add ApolloPropertySources to env, add list empty check logic (#2733)"
This reverts commit
d9f9a850
.
parent
b3d2ee1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java
...mework/apollo/spring/config/PropertySourcesProcessor.java
+4
-8
No files found.
apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java
View file @
9f1264f2
...
...
@@ -29,7 +29,6 @@ import java.util.Collection;
import
java.util.Iterator
;
import
org.springframework.core.env.MutablePropertySources
;
import
org.springframework.core.env.PropertySource
;
import
org.springframework.util.CollectionUtils
;
/**
* Apollo Property Sources processor for Spring Annotation Based Application. <br /> <br />
...
...
@@ -83,21 +82,18 @@ public class PropertySourcesProcessor implements BeanFactoryPostProcessor, Envir
// clean up
NAMESPACE_NAMES
.
clear
();
// ensure ApolloBootstrapPropertySources is still the first
ensureBootstrapPropertyPrecedence
(
environment
);
if
(
CollectionUtils
.
isEmpty
(
composite
.
getPropertySources
()))
{
return
;
}
// add after the bootstrap property source or to the first
if
(
environment
.
getPropertySources
()
.
contains
(
PropertySourcesConstants
.
APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME
))
{
// ensure ApolloBootstrapPropertySources is still the first
ensureBootstrapPropertyPrecedence
(
environment
);
environment
.
getPropertySources
()
.
addAfter
(
PropertySourcesConstants
.
APOLLO_BOOTSTRAP_PROPERTY_SOURCE_NAME
,
composite
);
}
else
{
environment
.
getPropertySources
().
addFirst
(
composite
);
}
}
private
void
ensureBootstrapPropertyPrecedence
(
ConfigurableEnvironment
environment
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment