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 095c358c2..3478d5bcc 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 @@ -47,6 +47,7 @@ public class AggregateApplicationBuilder { ConfigurableApplicationContext parentContext; public AggregateApplicationBuilder() { + this(SpringApplication.run(addAggregatorParentIfMissing(new Object[]{}), new String[]{})); } public AggregateApplicationBuilder(Object source, String... args) { @@ -62,7 +63,6 @@ public class AggregateApplicationBuilder { } private static Object[] addAggregatorParentIfMissing(Object[] sources) { - Assert.notEmpty(sources, "At least one source must be provided"); Object[] aggregateParentSources; if (!ObjectUtils.containsElement(sources, AggregatorParentConfiguration.class)) { // add the AggregatorParentConfiguration first, so it can be overridden