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-cli/samples/integration.groovy

18 lines
361 B
Groovy

package org.test
@Component
@EnableIntegrationPatterns
class SpringIntegrationExample implements CommandLineRunner {
@Bean
MessageFlow flow(ApplicationContext context) {
def builder = new IntegrationBuilder(context)
builder.messageFlow { transform {"Hello, $it!"} }
}
@Override
void run(String... args) {
print flow().sendAndReceive("World")
}
}