mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 03:13:21 +08:00
$ cd spring-bootstrap-cli $ export SPRING_HOME=target $ src/main/scripts/spring run samples/integration.groovy The big disadvantage at the moment is that there is no goo way to detect Spring Integration in the AST (at least not as good as @Enable*). So for now we are looking for @MessageEndpoint or a class name with SpringIntegration in it. [#48151147]
16 lines
293 B
Groovy
16 lines
293 B
Groovy
package org.test
|
|
|
|
@Component
|
|
class SpringIntegrationExample implements CommandLineRunner {
|
|
|
|
def builder = new IntegrationBuilder()
|
|
def flow = builder.messageFlow {
|
|
transform {"Hello, $it!"}
|
|
}
|
|
|
|
@Override
|
|
public void run(String... args) {
|
|
print flow.sendAndReceive("World")
|
|
}
|
|
}
|