mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
10c333ea10
@Bean definitions in Groovy that contain closures have the bean name in the class name. Ugh. Added regex match to catch that. [#48718891]
18 lines
361 B
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")
|
|
}
|
|
}
|