Add Reactor autoconfiguration

* Make Rector @Autowirable
* Create a ConsumerBeanPostProcessor so users can add
@On and @Reply to bean methods
* Added groovy auto compiler and script sample

[#53955419] [bs-250]
This commit is contained in:
Dave Syer
2013-07-24 14:56:30 +01:00
parent a365b8c1b6
commit 683ddbf525
12 changed files with 218 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
package org.test
@EnableReactor
@Log
class Runner implements CommandLineRunner {
@Autowired
Reactor reactor
void run(String... args) {
reactor.notify("hello", Event.wrap("Phil"))
log.info "Notified Phil"
}
@On(reactor="reactor", selector="hello")
void receive(Event<String> event) {
log.info "Hello ${event.data}"
}
}