Skip to content

Commit 95d3d02

Browse files
committed
Update PropertySourceExtensionLoader.java
1 parent fe3bf8b commit 95d3d02

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

microsphere-spring-context/src/main/java/io/microsphere/spring/config/context/annotation/PropertySourceExtensionLoader.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,17 @@ protected void addPropertySource(EA extensionAttributes, MutablePropertySources
144144
String relativePropertySourceName = extensionAttributes.getAfterPropertySourceName();
145145
if (hasText(relativePropertySourceName)) {
146146
propertySources.addAfter(relativePropertySourceName, propertySource);
147-
} else {
148-
relativePropertySourceName = extensionAttributes.getBeforePropertySourceName();
147+
return;
149148
}
149+
150+
relativePropertySourceName = extensionAttributes.getBeforePropertySourceName();
150151
if (hasText(relativePropertySourceName)) {
151152
propertySources.addBefore(relativePropertySourceName, propertySource);
152-
} else {
153-
propertySources.addLast(propertySource);
153+
return;
154154
}
155+
156+
// default, add the PropertySource into last
157+
propertySources.addLast(propertySource);
155158
}
156159
}
157160

0 commit comments

Comments
 (0)