Merge pull request #4449 from eddumelendez/gh-4445

* pr/4449:
  Fix springProfile with multi profiles separated by comma and whitespace
pull/4454/head
Phillip Webb 9 years ago
commit b09d0e1e3b

@ -67,8 +67,8 @@ class SpringProfileAction extends Action implements InPlayListener {
} }
private boolean acceptsProfiles(InterpretationContext ic, Attributes attributes) { private boolean acceptsProfiles(InterpretationContext ic, Attributes attributes) {
String[] profileNames = StringUtils String[] profileNames = StringUtils.trimArrayElements(StringUtils
.commaDelimitedListToStringArray(attributes.getValue(NAME_ATTRIBUTE)); .commaDelimitedListToStringArray(attributes.getValue(NAME_ATTRIBUTE)));
if (profileNames.length != 0) { if (profileNames.length != 0) {
for (String profileName : profileNames) { for (String profileName : profileNames) {
OptionHelper.substVars(profileName, ic, this.context); OptionHelper.substVars(profileName, ic, this.context);

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" /> <include resource="org/springframework/boot/logging/logback/base.xml" />
<springProfile name="production,test"> <springProfile name="production, test">
<logger name="org.springframework.boot.logging.logback" level="TRACE" /> <logger name="org.springframework.boot.logging.logback" level="TRACE" />
</springProfile> </springProfile>
</configuration> </configuration>

Loading…
Cancel
Save