A bit of reactor updates

This commit is contained in:
Yuriy Dvorzhetskiy
2022-02-05 18:18:37 +03:00
parent 76ff65ff28
commit 42672ecb46
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.6</version>
<version>2.6.3</version>
<relativePath/>
</parent>
@@ -13,8 +13,8 @@ public class NonFluxService {
public Message nonFluxSayHello(Message message) {
logger.info("Message received in non-flux service: {}", message.getValue());
final String name = message.getValue();
final String withHello = "Hello, " + name + "!";
String name = message.getValue();
String withHello = "Hello, " + name + "!";
try {
Thread.sleep(1000);
return new Message(withHello);
+4 -2
View File
@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.6.RELEASE</version>
<version>2.6.3</version>
<relativePath/>
</parent>
@@ -25,7 +25,9 @@
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!-- работает и без неё, но нужна для RxJava контроллера -->
<!--
работает и без этой зависимости на Project Reactor,
но она нужна для демонстрации RxJava2 контроллера -->
<dependency>
<groupId>io.reactivex.rxjava2</groupId>
<artifactId>rxjava</artifactId>