GH-1175 Removed dependency on spring-boot-starter-web

- Removed spring-boot-starter-web dependency from the core
- Polished AggregateApplicationBuilder to ensure it thriows meaningful exception when web is enabled but 'spring-boot-starter-web' is not on the classpath
- fixed Aggregator tests to defualt to no-web
- added spring-boot-starter-web to schema projects

Resolves #1175
This commit is contained in:
Oleg Zhurakousky
2018-02-09 10:28:54 -05:00
parent 0332d16c48
commit 0463f7939d
9 changed files with 33 additions and 28 deletions

View File

@@ -65,8 +65,7 @@ public class MessageChannelConfigurerTests {
@Autowired
private CompositeMessageConverterFactory messageConverterFactory;
@Autowired
private ObjectMapper objectMapper;
private ObjectMapper objectMapper = new ObjectMapper();
@Autowired
private MessageCollector messageCollector;
@@ -97,7 +96,6 @@ public class MessageChannelConfigurerTests {
assertThat(!objectMapper.getSerializationConfig().isEnabled(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS))
.withFailMessage("SerializationFeature 'WRITE_DATES_AS_TIMESTAMPS' should be disabled");
// assert that the globally set bean is used by the converters
assertThat(objectMapper).isSameAs(this.objectMapper);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017 the original author or authors.
* Copyright 2017-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@ public class AggregateApplicationTests {
@SuppressWarnings("unchecked")
public void testAggregateApplication() throws Exception {
ConfigurableApplicationContext context = new AggregateApplicationBuilder(
TestSupportBinderAutoConfiguration.class).from(TestSource.class).to(TestProcessor.class).run();
TestSupportBinderAutoConfiguration.class).web(false).from(TestSource.class).to(TestProcessor.class).run();
TestSupportBinder testSupportBinder = (TestSupportBinder) context.getBean(BinderFactory.class).getBinder(null,
MessageChannel.class);
MessageChannel processorOutput = testSupportBinder.getChannelForName("output");