diff --git a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/aggregate/AggregateApplicationBuilder.java b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/aggregate/AggregateApplicationBuilder.java index cca6d49ad..46d966d80 100644 --- a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/aggregate/AggregateApplicationBuilder.java +++ b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/aggregate/AggregateApplicationBuilder.java @@ -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]),