[bs-19] Medley of changes supporting integration apps
* Use file adapters in sample instead of internal flow * Add Exception to signature of CommandLineRunner for implementation convenience * Updates for Security snapshots
This commit is contained in:
@@ -4,10 +4,10 @@ package org.test
|
||||
class Example implements CommandLineRunner {
|
||||
|
||||
@Autowired
|
||||
private MyService myService;
|
||||
private MyService myService
|
||||
|
||||
public void run(String... args) {
|
||||
print "Hello " + this.myService.sayWorld();
|
||||
void run(String... args) {
|
||||
print "Hello " + this.myService.sayWorld()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ class Example implements CommandLineRunner {
|
||||
@Service
|
||||
class MyService {
|
||||
|
||||
public String sayWorld() {
|
||||
return "World!";
|
||||
String sayWorld() {
|
||||
return "World!"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package org.test
|
||||
|
||||
@Grab("org.springframework.bootstrap:spring-bootstrap-service:0.0.1-SNAPSHOT")
|
||||
@Grab("org.springframework.integration:spring-integration-dsl-groovy-amqp:1.0.0.M1")
|
||||
|
||||
@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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user