You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-boot/spring-boot-cli/samples/integration.groovy

27 lines
436 B
Groovy

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