Skip to content

Commit 73df270

Browse files
committed
Remove code
1 parent 1c8aa6b commit 73df270

File tree

9 files changed

+4
-162
lines changed

9 files changed

+4
-162
lines changed

blocking-service/src/main/java/com/example/Word.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

blocking-service/src/main/java/com/example/WordRepository.java

Lines changed: 0 additions & 19 deletions
This file was deleted.

blocking-service/src/main/java/com/example/WordService.java

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
package com.example;
22

3-
import java.util.concurrent.TimeUnit;
4-
53
public class Application {
64

7-
public static void main(String[] args) throws InterruptedException {
5+
public static void main(String[] args) {
86
for (int u = 1; u <= 10; u++) {
97
var user = "User " + u;
10-
Service.getFlux()
11-
.map(i -> user + " - " + i)
12-
.subscribe(System.out::println);
8+
Service.getStream()
9+
.mapToObj(i -> user + " - " + i)
10+
.forEach(System.out::println);
1311
}
14-
15-
TimeUnit.SECONDS.sleep(5);
1612
}
1713

1814
}
Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package com.example;
22

3-
import reactor.core.publisher.Flux;
4-
5-
import java.time.Duration;
63
import java.util.stream.IntStream;
74

85
public class Service {
@@ -17,9 +14,4 @@ public static IntStream getStream() {
1714
});
1815
}
1916

20-
public static Flux<Integer> getFlux() {
21-
return Flux.interval(Duration.ofSeconds(1))
22-
.map(l -> (int) (Math.random() * 10));
23-
}
24-
2517
}

reactive-service/src/main/java/com/example/Word.java

Lines changed: 0 additions & 16 deletions
This file was deleted.

reactive-service/src/main/java/com/example/WordRepository.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

reactive-service/src/main/java/com/example/WordService.java

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
11
server.port=9090
22
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration
33

4-
spring.r2dbc.url=r2dbc:mariadb://localhost:3306/wordle
5-
spring.r2dbc.username=user
6-
spring.r2dbc.password=password
7-
spring.r2dbc.pool.max-size=10
8-
spring.r2dbc.pool.max-create-connection-time=10s
9-
10-
# If you are using MariaDB SkySQL (https://mariadb.com/products/skysql),
11-
# enable SSL and specify the path to the CA chain file that you can download
12-
# from the SkySQL Portal (https://cloud.mariadb.com):
13-
#
14-
# spring.r2dbc.url=r2dbc:mariadb://demo-db0000xxxx.mdb000xxxx.db.skysql.net:5047/reactive-demo?sslMode=VERIFY_CA&serverSslCert=/path/to/skysql_chain.pem

0 commit comments

Comments
 (0)