Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
553acd97
Commit
553acd97
authored
Aug 29, 2013
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Reactor 1.0.0.M2
parent
49857a83
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
48 deletions
+13
-48
ReactorAutoConfiguration.java
.../boot/autoconfigure/reactor/ReactorAutoConfiguration.java
+5
-17
reactor.groovy
spring-boot-cli/samples/reactor.groovy
+4
-9
ReactorCompilerAutoConfiguration.java
...piler/autoconfigure/ReactorCompilerAutoConfiguration.java
+3
-16
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
pom.xml
spring-boot-starters/spring-boot-starter-parent/pom.xml
+0
-5
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/reactor/ReactorAutoConfiguration.java
View file @
553acd97
...
@@ -23,12 +23,10 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
...
@@ -23,12 +23,10 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.annotation.Order
;
import
reactor.core.Environment
;
import
reactor.core.Environment
;
import
reactor.core.Reactor
;
import
reactor.core.Reactor
;
import
reactor.spring.context.
ConsumerBeanPostProcess
or
;
import
reactor.spring.context.
config.EnableReact
or
;
/**
/**
* {@link EnableAutoConfiguration Auto-configuration} for Reactor.
* {@link EnableAutoConfiguration Auto-configuration} for Reactor.
...
@@ -36,25 +34,15 @@ import reactor.spring.context.ConsumerBeanPostProcessor;
...
@@ -36,25 +34,15 @@ import reactor.spring.context.ConsumerBeanPostProcessor;
* @author Dave Syer
* @author Dave Syer
*/
*/
@Configuration
@Configuration
@ConditionalOnClass
(
ConsumerBeanPostProcess
or
.
class
)
@ConditionalOnClass
(
EnableReact
or
.
class
)
@ConditionalOnMissingBean
(
Reactor
.
class
)
@ConditionalOnMissingBean
(
Reactor
.
class
)
@AutoConfigureAfter
(
WebMvcAutoConfiguration
.
class
)
@AutoConfigureAfter
(
WebMvcAutoConfiguration
.
class
)
@EnableReactor
public
class
ReactorAutoConfiguration
{
public
class
ReactorAutoConfiguration
{
@Bean
@Bean
public
Environment
reactorEnvironment
()
{
public
Reactor
rootReactor
(
Environment
environment
)
{
return
new
Environment
();
return
environment
.
getRootReactor
();
}
@Bean
public
Reactor
rootReactor
()
{
return
reactorEnvironment
().
getRootReactor
();
}
@Bean
@Order
(
Ordered
.
LOWEST_PRECEDENCE
)
protected
ConsumerBeanPostProcessor
reactorConsumerBeanPostProcessor
()
{
return
new
ConsumerBeanPostProcessor
();
}
}
}
}
spring-boot-cli/samples/reactor.groovy
View file @
553acd97
...
@@ -14,12 +14,6 @@ class Runner implements CommandLineRunner {
...
@@ -14,12 +14,6 @@ class Runner implements CommandLineRunner {
@PostConstruct
@PostConstruct
void
init
()
{
void
init
()
{
log
.
info
"Registering consumer"
log
.
info
"Registering consumer"
reactor
.
on
(
Selectors
.
$
(
"hello"
),
[
accept:
{
log
.
info
(
"Hello ${it.data}"
)
latch
.
countDown
()
}
]
as
Consumer
)
}
}
void
run
(
String
...
args
)
{
void
run
(
String
...
args
)
{
...
@@ -28,9 +22,10 @@ class Runner implements CommandLineRunner {
...
@@ -28,9 +22,10 @@ class Runner implements CommandLineRunner {
latch
.
await
()
latch
.
await
()
}
}
// @On(reactor="reactor", selector="hello")
@Selector
(
reactor
=
"reactor"
,
value
=
"hello"
)
void
receive
(
Event
<
String
>
event
)
{
void
receive
(
String
data
)
{
log
.
info
"Hello ${event.data}"
log
.
info
"Hello ${data}"
latch
.
countDown
()
}
}
}
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java
View file @
553acd97
...
@@ -16,12 +16,6 @@
...
@@ -16,12 +16,6 @@
package
org
.
springframework
.
boot
.
cli
.
compiler
.
autoconfigure
;
package
org
.
springframework
.
boot
.
cli
.
compiler
.
autoconfigure
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
import
org.codehaus.groovy.ast.ClassNode
;
import
org.codehaus.groovy.ast.ClassNode
;
import
org.codehaus.groovy.control.customizers.ImportCustomizer
;
import
org.codehaus.groovy.control.customizers.ImportCustomizer
;
import
org.springframework.boot.cli.compiler.AstUtils
;
import
org.springframework.boot.cli.compiler.AstUtils
;
...
@@ -54,17 +48,10 @@ public class ReactorCompilerAutoConfiguration extends CompilerAutoConfiguration
...
@@ -54,17 +48,10 @@ public class ReactorCompilerAutoConfiguration extends CompilerAutoConfiguration
public
void
applyImports
(
ImportCustomizer
imports
)
{
public
void
applyImports
(
ImportCustomizer
imports
)
{
imports
.
addImports
(
"reactor.core.Reactor"
,
"reactor.event.Event"
,
imports
.
addImports
(
"reactor.core.Reactor"
,
"reactor.event.Event"
,
"reactor.function.Consumer"
,
"reactor.function.Functions"
,
"reactor.function.Consumer"
,
"reactor.function.Functions"
,
"reactor.event.selector.Selectors"
,
"reactor.event.selector.Selectors"
,
"reactor.spring.annotation.Selector"
,
"reactor.spring.context.annotation.On"
,
"reactor.spring.annotation.ReplyTo"
,
"reactor.spring.context.annotation.Reply"
,
"reactor.spring.context.config.EnableReactor"
).
addStarImports
(
EnableReactor
.
class
.
getCanonicalName
()).
addStarImports
(
"reactor.event.Selectors"
);
"reactor.event.Selectors"
);
}
}
@Target
(
ElementType
.
TYPE
)
@Documented
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
static
@interface
EnableReactor
{
}
}
}
spring-boot-dependencies/pom.xml
View file @
553acd97
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<tomcat.version>
7.0.42
</tomcat.version>
<tomcat.version>
7.0.42
</tomcat.version>
<jetty.version>
8.1.9.v20130131
</jetty.version>
<jetty.version>
8.1.9.v20130131
</jetty.version>
<aspectj.version>
1.7.3
</aspectj.version>
<aspectj.version>
1.7.3
</aspectj.version>
<reactor.version>
1.0.0.M
1
</reactor.version>
<reactor.version>
1.0.0.M
2
</reactor.version>
</properties>
</properties>
<dependencyManagement>
<dependencyManagement>
<dependencies>
<dependencies>
...
...
spring-boot-starters/spring-boot-starter-parent/pom.xml
View file @
553acd97
...
@@ -290,11 +290,6 @@
...
@@ -290,11 +290,6 @@
</plugin>
</plugin>
</plugins>
</plugins>
</pluginManagement>
</pluginManagement>
<plugins>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
</plugin>
</plugins>
</build>
</build>
<profiles>
<profiles>
<profile>
<profile>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment