当筵意气临九霄,星离雨散不终朝。这篇文章主要讲述#yyds干货盘点#Project Reactor相关的知识,希望能为你提供帮助。
Operators - Publisher / Subscriber
- Nothing Happens Until You subscribe()
- Flux [ 0..N ] - onNext()、onComplete()、onError()
- Mono [ 0..1 ] - onNext()、onComplete()、onError()
- Subscription
- onRequest()、onCancel()、onDispose()
- immediate() / single() / newSingle()
- elastic() / parallel() / newParallel()
- onError / onErrorReturn / onErrorResume
- doOnError / doFinally
< ?xml version="1.0" encoding="UTF-8"?>
< project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
< modelVersion> 4.0.0< /modelVersion>
< parent>
< groupId> org.springframework.boot< /groupId>
< artifactId> spring-boot-starter-parent< /artifactId>
< version> 2.1.2.RELEASE< /version>
< relativePath/> < !-- lookup parent from repository -->
< /parent>
< groupId> com.zhz< /groupId>
< artifactId> reactor-spring-bootsimple-reactor-demo< /artifactId>
< version> 0.0.1-SNAPSHOT< /version>
< name> reactor-spring-bootsimple-reactor-demo< /name>
< description> Spring Boot集成reactor< /description>
< properties>
< java.version> 1.8< /java.version>
< /properties>
< dependencies>
< dependency>
< groupId> org.springframework.boot< /groupId>
< artifactId> spring-boot-starter< /artifactId>
< /dependency>
< dependency>
< groupId> org.projectlombok< /groupId>
< artifactId> lombok< /artifactId>
< /dependency>
< dependency>
< groupId> io.projectreactor< /groupId>
< artifactId> reactor-core< /artifactId>
< /dependency>
< dependency>
< groupId> org.springframework.boot< /groupId>
< artifactId> spring-boot-starter-test< /artifactId>
< scope> test< /scope>
< /dependency>
< /dependencies>
< build>
< plugins>
< plugin>
< groupId> org.springframework.boot< /groupId>
< artifactId> spring-boot-maven-plugin< /artifactId>
< /plugin>
< /plugins>
< /build>
< /project>
2、测试代码
package com.zhz.reactor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import reactor.core.publisher.Flux;
import reactor.core.scheduler.Scheduler;
import reactor.推荐阅读
- #yyds干货盘点#CCNA学习记录8
- 准时下班系列!Excel合集之第5集—如何用Excel实现微信通讯录查找功能
- CENTOS 7(LINUX 7)关于禁用透明大页的实验#干货盘点#
- Three.js 入门指南
- Windows 8正式版系统中的帮助提示怎样删除
- 运用Windows 8系统超级按钮迅速调整常用设置的技巧【图文】
- Win8系统遇到代码出错8024200D的处理办法
- 微软低调推送Windows 8 Update2不包含开始菜单【图】
- Windows 8系统如何迅速删除不需要的安全软件【图文】