|
|
@ -109,8 +109,8 @@ public class EnableAutoConfigurationImportSelectorTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void propertyExclusionsAreApplied() {
|
|
|
|
public void propertyExclusionsAreApplied() {
|
|
|
|
configureExclusions(new String[0], new String[0], new String[] {
|
|
|
|
configureExclusions(new String[0], new String[0],
|
|
|
|
FreeMarkerAutoConfiguration.class.getName()});
|
|
|
|
new String[] { FreeMarkerAutoConfiguration.class.getName() });
|
|
|
|
String[] imports = this.importSelector.selectImports(this.annotationMetadata);
|
|
|
|
String[] imports = this.importSelector.selectImports(this.annotationMetadata);
|
|
|
|
assertThat(imports.length,
|
|
|
|
assertThat(imports.length,
|
|
|
|
is(equalTo(getAutoConfigurationClassNames().size() - 1)));
|
|
|
|
is(equalTo(getAutoConfigurationClassNames().size() - 1)));
|
|
|
@ -121,8 +121,8 @@ public class EnableAutoConfigurationImportSelectorTests {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void severalPropertyExclusionsAreApplied() {
|
|
|
|
public void severalPropertyExclusionsAreApplied() {
|
|
|
|
configureExclusions(new String[0], new String[0], new String[] {
|
|
|
|
configureExclusions(new String[0], new String[0], new String[] {
|
|
|
|
FreeMarkerAutoConfiguration.class.getName(), VelocityAutoConfiguration
|
|
|
|
FreeMarkerAutoConfiguration.class.getName(),
|
|
|
|
.class.getName()});
|
|
|
|
VelocityAutoConfiguration.class.getName() });
|
|
|
|
|
|
|
|
|
|
|
|
String[] imports = this.importSelector.selectImports(this.annotationMetadata);
|
|
|
|
String[] imports = this.importSelector.selectImports(this.annotationMetadata);
|
|
|
|
assertThat(imports.length,
|
|
|
|
assertThat(imports.length,
|
|
|
@ -160,8 +160,7 @@ public class EnableAutoConfigurationImportSelectorTests {
|
|
|
|
nameExclusion);
|
|
|
|
nameExclusion);
|
|
|
|
if (propertyExclusion.length > 0) {
|
|
|
|
if (propertyExclusion.length > 0) {
|
|
|
|
String value = StringUtils.arrayToCommaDelimitedString(propertyExclusion);
|
|
|
|
String value = StringUtils.arrayToCommaDelimitedString(propertyExclusion);
|
|
|
|
this.environment.setProperty("spring.autoconfigure.exclude",
|
|
|
|
this.environment.setProperty("spring.autoconfigure.exclude", value);
|
|
|
|
value);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|