Polishing AggregateApplicationBuilder

This commit is contained in:
Soby Chacko
2018-06-11 16:01:31 -04:00
parent cb1854d0fd
commit 729a30f48b

View File

@@ -34,7 +34,7 @@ import org.springframework.boot.actuate.endpoint.MetricReaderPublicMetrics;
import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration;
import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration;
import org.springframework.boot.bind.PropertySourcesPropertyValues;
import org.springframework.boot.bind.RelaxedDataBinder;
import org.springframework.boot.bind.RelaxedNames;
@@ -206,7 +206,7 @@ public class AggregateApplicationBuilder implements AggregateApplication, Applic
Assert.isTrue(ClassUtils.isPresent("javax.servlet.ServletRequest", ClassUtils.getDefaultClassLoader()),
"'webEnvironment' is set to 'true' but 'javax.servlet.*' does not appear to be available in "
+ "the classpath. Consider adding `org.springframework.boot:spring-boot-starter-web");
this.addParentSources(new Object[] { ServletWebServerFactoryAutoConfiguration.class });
this.addParentSources(new Object[] { EmbeddedServletContainerAutoConfiguration.class });
}
this.parentContext = AggregateApplicationUtils.createParentContext(
this.parentSources.toArray(new Object[0]),