Merge branch '2.1.x'
Closes gh-17079
This commit is contained in:
@@ -35,8 +35,7 @@ import org.springframework.integration.file.FileWritingMessageHandler;
|
||||
public class SampleParentContextApplication {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new SpringApplicationBuilder(Parent.class)
|
||||
.child(SampleParentContextApplication.class).run(args);
|
||||
new SpringApplicationBuilder(Parent.class).child(SampleParentContextApplication.class).run(args);
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@@ -68,21 +67,18 @@ public class SampleParentContextApplication {
|
||||
|
||||
@Bean
|
||||
public FileWritingMessageHandler fileWriter() {
|
||||
FileWritingMessageHandler writer = new FileWritingMessageHandler(
|
||||
this.serviceProperties.getOutputDir());
|
||||
FileWritingMessageHandler writer = new FileWritingMessageHandler(this.serviceProperties.getOutputDir());
|
||||
writer.setExpectReply(false);
|
||||
return writer;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public IntegrationFlow integrationFlow(SampleEndpoint endpoint) {
|
||||
return IntegrationFlows.from(fileReader(), new FixedRatePoller())
|
||||
.channel(inputChannel()).handle(endpoint).channel(outputChannel())
|
||||
.handle(fileWriter()).get();
|
||||
return IntegrationFlows.from(fileReader(), new FixedRatePoller()).channel(inputChannel()).handle(endpoint)
|
||||
.channel(outputChannel()).handle(fileWriter()).get();
|
||||
}
|
||||
|
||||
private static class FixedRatePoller
|
||||
implements Consumer<SourcePollingChannelAdapterSpec> {
|
||||
private static class FixedRatePoller implements Consumer<SourcePollingChannelAdapterSpec> {
|
||||
|
||||
@Override
|
||||
public void accept(SourcePollingChannelAdapterSpec spec) {
|
||||
|
||||
Reference in New Issue
Block a user