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
ec3c5b53
Commit
ec3c5b53
authored
Jul 30, 2013
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add auto compile tweaks for reactor
parent
9cf59050
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
4 deletions
+24
-4
.gitignore
.gitignore
+1
-0
reactor.groovy
spring-boot-cli/samples/reactor.groovy
+17
-1
ReactorCompilerAutoConfiguration.java
...piler/autoconfigure/ReactorCompilerAutoConfiguration.java
+4
-1
pom.xml
spring-boot-integration-tests/pom.xml
+2
-2
No files found.
.gitignore
View file @
ec3c5b53
...
...
@@ -15,3 +15,4 @@ dependency-reduced-pom.xml
build.log
_site/
.*.md.html
manifest.yml
spring-boot-cli/samples/reactor.groovy
View file @
ec3c5b53
package
org.test
import
java.util.concurrent.CountDownLatch
;
@EnableReactor
@Log
class
Runner
implements
CommandLineRunner
{
@Autowired
Reactor
reactor
private
CountDownLatch
latch
=
new
CountDownLatch
(
1
)
@PostConstruct
void
init
()
{
log
.
info
"Registering consumer"
reactor
.
on
(
Selectors
.
$
(
"hello"
),
[
accept:
{
log
.
info
(
"Hello ${it.data}"
)
latch
.
countDown
()
}
]
as
Consumer
)
}
void
run
(
String
...
args
)
{
reactor
.
notify
(
"hello"
,
Event
.
wrap
(
"Phil"
))
log
.
info
"Notified Phil"
latch
.
await
()
}
@On
(
reactor
=
"reactor"
,
selector
=
"hello"
)
//
@On(reactor="reactor", selector="hello")
void
receive
(
Event
<
String
>
event
)
{
log
.
info
"Hello ${event.data}"
}
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/autoconfigure/ReactorCompilerAutoConfiguration.java
View file @
ec3c5b53
...
...
@@ -53,9 +53,12 @@ public class ReactorCompilerAutoConfiguration extends CompilerAutoConfiguration
@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.context.annotation.On"
,
"reactor.spring.context.annotation.Reply"
,
EnableReactor
.
class
.
getCanonicalName
());
EnableReactor
.
class
.
getCanonicalName
()).
addStarImports
(
"reactor.event.Selectors"
);
}
@Target
(
ElementType
.
TYPE
)
...
...
spring-boot-integration-tests/pom.xml
View file @
ec3c5b53
...
...
@@ -13,7 +13,7 @@
<main.basedir>
${basedir}/..
</main.basedir>
</properties>
<dependencies>
<!-- Ensure other reactor projects are buil
d
before running integration tests -->
<!-- Ensure other reactor projects are buil
t
before running integration tests -->
<dependency>
<groupId>
${project.groupId}
</groupId>
<artifactId>
spring-boot
</artifactId>
...
...
@@ -104,7 +104,7 @@
<build>
<plugins>
<plugin>
<!-- Invoke integration tests in the install phase, after the
spring-package-
maven-plugin is available -->
<!-- Invoke integration tests in the install phase, after the maven-plugin is available -->
<artifactId>
maven-invoker-plugin
</artifactId>
<configuration>
<settingsFile>
src/it/settings.xml
</settingsFile>
...
...
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