Register references to child context instead of the bindable proxies

Fix #819
This commit is contained in:
Marius Bogoevici
2017-02-21 11:32:30 -05:00
committed by Soby Chacko
parent 02fdd7c9dd
commit e46d7ede73
3 changed files with 31 additions and 7 deletions

View File

@@ -42,8 +42,8 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Marius Bogoevici
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AggregateTestWithBean.ChainedProcessors.class, properties = {"server.port=-1"})
public class AggregateTestWithBean {
@SpringBootTest(classes = AggregateWithBeanTest.ChainedProcessors.class, properties = {"server.port=-1"})
public class AggregateWithBeanTest {
@Autowired
public MessageCollector messageCollector;

View File

@@ -20,6 +20,7 @@ import java.util.concurrent.TimeUnit;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.aggregate.AggregateApplication;
import org.springframework.cloud.stream.aggregate.AggregateApplicationBuilder;
import org.springframework.cloud.stream.annotation.EnableBinding;
@@ -37,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Marius Bogoevici
*/
public class AggregateTestWithMain {
public class AggregateWithMainTest {
@Test
public void testAggregateApplication() throws InterruptedException {
@@ -60,6 +61,10 @@ public class AggregateTestWithMain {
@EnableBinding(Processor.class)
public static class UppercaseProcessor {
@Autowired
Processor processor;
@Transformer(inputChannel = Processor.INPUT, outputChannel = Processor.OUTPUT)
public String transform(String in) {
return in.toUpperCase();