Make sure integration still works in CLI
parent
aa2b020660
commit
4cfc7b6ad9
@ -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}"
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:int="http://www.springframework.org/schema/integration"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<int:annotation-config />
|
||||
|
||||
</beans>
|
Loading…
Reference in New Issue