Upgrade to Reactor 1.1

Fixes gh-706
This commit is contained in:
Dave Syer
2014-04-30 11:26:57 +01:00
parent a27be338c6
commit f46d281b22
4 changed files with 32 additions and 11 deletions

View File

@@ -3,6 +3,7 @@ package org.test
import java.util.concurrent.CountDownLatch;
@EnableReactor
@Consumer
@Log
class Runner implements CommandLineRunner {
@@ -22,7 +23,7 @@ class Runner implements CommandLineRunner {
latch.await()
}
@Selector(reactor="reactor", value="hello")
@Selector(value="hello")
void receive(String data) {
log.info "Hello ${data}"
latch.countDown()

View File

@@ -37,17 +37,22 @@ public class ReactorCompilerAutoConfiguration extends CompilerAutoConfiguration
@Override
public void applyDependencies(DependencyCustomizer dependencies) {
dependencies.ifAnyMissingClasses("reactor.core.Reactor")
.add("reactor-spring", false).add("reactor-core");
.add("reactor-spring-context", false).add("reactor-spring-core", false)
.add("reactor-core");
}
@Override
public void applyImports(ImportCustomizer imports) {
imports.addImports("reactor.core.Reactor", "reactor.event.Event",
"reactor.function.Consumer", "reactor.function.Functions",
"reactor.event.selector.Selectors", "reactor.spring.annotation.Selector",
"reactor.spring.annotation.ReplyTo",
"reactor.spring.context.config.EnableReactor").addStarImports(
"reactor.event.Selectors");
"reactor.event.selector.Selectors",
"reactor.spring.context.annotation.Consumer",
"reactor.spring.context.annotation.Selector",
"reactor.spring.context.annotation.SelectorType",
"reactor.spring.context.annotation.ReplyTo",
"reactor.spring.context.config.EnableReactor")
.addStarImports("reactor.event.Selectors")
.addImport("ReactorEnvironment", "reactor.core.Environment");
}
}