File tree 4 files changed +24
-4
lines changed
src/main/java/org/springframework/boot/cli/compiler/autoconfigure
spring-boot-integration-tests
4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ dependency-reduced-pom.xml
15
15
build.log
16
16
_site /
17
17
. * .md.html
18
+ manifest.yml
Original file line number Diff line number Diff line change 1
1
package org.test
2
2
3
+ import java.util.concurrent.CountDownLatch ;
4
+
3
5
@EnableReactor
4
6
@Log
5
7
class Runner implements CommandLineRunner {
6
8
7
9
@Autowired
8
10
Reactor reactor
11
+
12
+ private CountDownLatch latch = new CountDownLatch (1 )
13
+
14
+ @PostConstruct
15
+ void init () {
16
+ log. info " Registering consumer"
17
+ reactor. on(Selectors . $(" hello" ), [
18
+ accept : {
19
+ log. info(" Hello ${ it.data} " )
20
+ latch. countDown()
21
+ }
22
+ ] as Consumer )
23
+ }
9
24
10
25
void run (String ... args ) {
11
26
reactor. notify(" hello" , Event . wrap(" Phil" ))
12
27
log. info " Notified Phil"
28
+ latch. await()
13
29
}
14
30
15
- @On (reactor = " reactor" , selector = " hello" )
31
+ // @On(reactor="reactor", selector="hello")
16
32
void receive (Event<String > event ) {
17
33
log. info " Hello ${ event.data} "
18
34
}
Original file line number Diff line number Diff line change @@ -53,9 +53,12 @@ public void applyDependencies(DependencyCustomizer dependencies) {
53
53
@ Override
54
54
public void applyImports (ImportCustomizer imports ) {
55
55
imports .addImports ("reactor.core.Reactor" , "reactor.event.Event" ,
56
+ "reactor.function.Consumer" , "reactor.function.Functions" ,
57
+ "reactor.event.selector.Selectors" ,
56
58
"reactor.spring.context.annotation.On" ,
57
59
"reactor.spring.context.annotation.Reply" ,
58
- EnableReactor .class .getCanonicalName ());
60
+ EnableReactor .class .getCanonicalName ()).addStarImports (
61
+ "reactor.event.Selectors" );
59
62
}
60
63
61
64
@ Target (ElementType .TYPE )
Original file line number Diff line number Diff line change 13
13
<main .basedir>${basedir} /..</main .basedir>
14
14
</properties >
15
15
<dependencies >
16
- <!-- Ensure other reactor projects are build before running integration tests -->
16
+ <!-- Ensure other reactor projects are built before running integration tests -->
17
17
<dependency >
18
18
<groupId >${project.groupId} </groupId >
19
19
<artifactId >spring-boot</artifactId >
104
104
<build >
105
105
<plugins >
106
106
<plugin >
107
- <!-- Invoke integration tests in the install phase, after the spring-package- maven-plugin is available -->
107
+ <!-- Invoke integration tests in the install phase, after the maven-plugin is available -->
108
108
<artifactId >maven-invoker-plugin</artifactId >
109
109
<configuration >
110
110
<settingsFile >src/it/settings.xml</settingsFile >
You can’t perform that action at this time.
0 commit comments