Make sure integration still works in CLI

This commit is contained in:
Dave Syer
2013-12-30 11:19:52 +00:00
parent aa2b020660
commit 4cfc7b6ad9
6 changed files with 59 additions and 8 deletions

View File

@@ -0,0 +1,26 @@
package org.test
@Component
@EnableIntegrationPatterns
class SpringIntegrationExample implements CommandLineRunner {
@Bean
DirectChannel input() {
new DirectChannel();
}
@Override
void run(String... args) {
print new MessagingTemplate(input()).convertSendAndReceive("World")
}
}
@MessageEndpoint
class HelloTransformer {
@Transformer(inputChannel="input")
String transform(String payload) {
"Hello, ${payload}"
}
}