{"id":3885,"date":"2019-02-19T16:30:57","date_gmt":"2019-02-19T08:30:57","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=3885"},"modified":"2019-02-19T16:30:57","modified_gmt":"2019-02-19T08:30:57","slug":"webflux-%e4%b9%8b-mono-api-%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=3885","title":{"rendered":"WebFlux \u4e4b Mono API \u6559\u7a0b"},"content":{"rendered":"<p>\n\t\u524d\u9762\u5199\u4e86\u4e00\u4e9b WebFlux \u65b9\u9762\u7684\u6559\u7a0b\uff0c\u53d1\u73b0\u5f88\u591a\u4eba\u641c\u7d22\u5230\u4e86\u6211\u7684\u6587\u7ae0\uff0c\u5e0c\u671b\u6211\u80fd\u7ee7\u7eed\u5199\u4e00\u4e9b\u6559\u7a0b\u3002\u4e8e\u662f\u4fbf\u6709\u4e86\u672c\u6587\u3002\n<\/p>\n<p>\n\t\u5173\u4e8e WebFlux \u524d\u9762\u6211\u5df2\u7ecf\u53cd\u590d\u5f3a\u8c03\u8fc7\uff0c\u5b83\u662f\u4e00\u79cd\u65b0\u7684\u7f16\u7a0b\u8d8b\u52bf\uff0c\u672a\u6765\u4f1a\u8d8a\u6765\u8d8a\u6d41\u884c\u3002\u6240\u4ee5\uff0c\u5f88\u6709\u5fc5\u8981\u8ba4\u771f\u7684\u5b66\u4e60\u5b66\u4e60\uff01\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Fulx \u548c Mono\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/wx1.sinaimg.cn\/large\/8fa5dcfcgy1g0bt92lvkyj20cq08t74x.jpg\" style=\"width: 458px;height: 317px\" \/>\n<\/p>\n<p>\n\tReactive Streams \u662f\u4e00\u4e2a\u6807\u51c6\u6216\u8005\u8bf4\u662f\u89c4\u8303\uff0c\u7531 Netflix\u3001TypeSafe\u3001Pivotal \u7b49\u516c\u53f8\u53d1\u8d77\u7684\u3002Reactor \u662f Spring \u4e2d\u7684\u4e00\u4e2a\u5b50\u9879\u76ee\uff0c\u4e00\u4e2a\u57fa\u4e8e java \u7684\u54cd\u5e94\u5f0f\u7f16\u7a0b\u6846\u67b6\uff0c\u8be5\u6846\u67b6\u5b9e\u73b0\u4e86 Reactive Programming\uff08\u53cd\u5e94\u5f0f\u7f16\u7a0b\u5373\u54cd\u5e94\u5f0f\u7f16\u7a0b\uff09 \u601d\u60f3\uff0c\u7b26\u5408 Reactive Streams \u89c4\u8303\u3002Mono \u548c Flux \u662f Reactor \u4e2d\u975e\u5e38\u91cd\u8981\u7684\u4e24\u4e2a\u7c7b\u3002\n<\/p>\n<p>\n\tReactive Streams \u662f\u89c4\u8303\uff0cReactor \u5b9e\u73b0\u4e86 Reactive Streams\u3002Web Flux \u4ee5 Reactor \u4e3a\u57fa\u7840\uff0c\u5b9e\u73b0 Web \u9886\u57df\u7684\u53cd\u5e94\u5f0f\u7f16\u7a0b\u6846\u67b6\u3002\n<\/p>\n<p>\n\tMono\u548cFlux\u90fd\u662fPublisher\uff08\u53d1\u5e03\u8005\uff09\u3002\n<\/p>\n<p>\n\t\u5176\u5b9e\uff0c\u5bf9\u4e8e\u5927\u90e8\u5206\u4e1a\u52a1\u5f00\u53d1\u4eba\u5458\u6765\u8bf4\uff0c\u5f53\u7f16\u5199\u53cd\u5e94\u5f0f\u4ee3\u7801\u65f6\uff0c\u6211\u4eec\u901a\u5e38\u53ea\u4f1a\u63a5\u89e6\u5230 Publisher \u8fd9\u4e2a\u63a5\u53e3\uff0c\u5bf9\u5e94\u5230 Reactor \u4fbf\u662f Mono \u548c Flux\u3002\u5bf9\u4e8e Subscriber \u548c Subcription \u8fd9\u4e24\u4e2a\u63a5\u53e3\uff0cReactor \u5fc5\u7136\u4e5f\u6709\u76f8\u5e94\u7684\u5b9e\u73b0\u3002\u4f46\u662f\uff0c\u8fd9\u4e9b\u90fd\u662f Web Flux \u548c Spring Data Reactive \u8fd9\u6837\u7684\u6846\u67b6\u7528\u5230\u7684\u3002\u5982\u679c\u4e0d\u5f00\u53d1\u4e2d\u95f4\u4ef6\uff0c\u901a\u5e38\u5f00\u53d1\u4eba\u5458\u662f\u4e0d\u4f1a\u63a5\u89e6\u5230\u7684\u3002\n<\/p>\n<p>\n\t\u6bd4\u5982\uff0c\u5728 Web Flux\uff0c\u4f60\u7684\u65b9\u6cd5\u53ea\u9700\u8fd4\u56de Mono \u6216 Flux \u5373\u53ef\u3002\u4f60\u7684\u4ee3\u7801\u57fa\u672c\u4e5f\u53ea\u548c Mono \u6216 Flux \u6253\u4ea4\u9053\u3002\u800c Web Flux \u5219\u4f1a\u5b9e\u73b0 Subscriber \uff0conNext \u65f6\u5c06\u4e1a\u52a1\u5f00\u53d1\u4eba\u5458\u7f16\u5199\u7684 Mono \u6216 Flux \u8f6c\u6362\u4e3a HTTP Response \u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002\n<\/p>\n<p>\n\tMono \u5b9e\u73b0\u4e86 org.reactivestreams.Publisher \u63a5\u53e3\uff0c\u4ee3\u88680\u52301\u4e2a\u5143\u7d20\u7684\u53d1\u5e03\u8005\uff08Publisher\uff09\u3002\n<\/p>\n<p>\n\t\u6839\u636e\u4e0a\u9762\u7684\u4ecb\u7ecd\uff0c\u53ef\u4ee5\u5f97\u51fa Mono &nbsp;\u76f8\u5f53\u4e8e Optional\uff0c\u6216\u548c Optional \u7684\u4f5c\u7528\u7c7b\u4f3c\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\n@RestController\r\npublic class MonoController {\r\n\r\n    @RequestMapping(&quot;\/hello&quot;)\r\n    public Optional&lt;String&gt; hello(@RequestParam(required = false) String str){\r\n        if(StringUtils.isEmpty(str)){\r\n            return Optional.empty();\r\n        }\r\n        return Optional.of(&quot;\u4e1a\u4f59\u8349\uff1awww.xttblog.com&quot;);\r\n    }\r\n\r\n    @RequestMapping(&quot;\/mono&quot;)\r\n    public Mono&lt;String&gt; mono(@RequestParam(required = false) String str){\r\n        if(StringUtils.isEmpty(str)){\r\n            return Mono.empty();\r\n        }\r\n        return Mono.just(&quot;\u4e1a\u4f59\u8349\uff1awww.xttblog.com&quot;);\r\n    }\r\n}<\/pre>\n<p>\n\t\u53cd\u5e94\u5f0f\u7f16\u7a0b\u6846\u67b6\u4e3b\u8981\u91c7\u7528\u4e86\u89c2\u5bdf\u8005\u6a21\u5f0f\uff0c\u800c Spring Reactor\u7684\u6838\u5fc3\u5219\u662f\u5bf9\u89c2\u5bdf\u8005\u6a21\u5f0f\u7684\u4e00\u79cd\u884d\u4f38\u3002\u5173\u4e8e\u89c2\u5bdf\u8005\u6a21\u5f0f\u7684\u67b6\u6784\u4e2d\u88ab\u89c2\u5bdf\u8005(Observable)\u548c\u89c2\u5bdf\u8005(Subscriber)\u5904\u5728\u4e0d\u540c\u7684\u7ebf\u7a0b\u73af\u5883\u4e2d\u65f6\uff0c\u7531\u4e8e\u8005\u5404\u81ea\u7684\u5de5\u4f5c\u91cf\u4e0d\u4e00\u6837\uff0c\u5bfc\u81f4\u5b83\u4eec\u4ea7\u751f\u4e8b\u4ef6\u548c\u5904\u7406\u4e8b\u4ef6\u7684\u901f\u5ea6\u4e0d\u4e00\u6837\uff0c\u8fd9\u65f6\u5c31\u51fa\u73b0\u4e86\u4e24\u79cd\u60c5\u51b5\uff1a\n<\/p>\n<ul>\n<li>\n\t\t\u88ab\u89c2\u5bdf\u8005\u4ea7\u751f\u4e8b\u4ef6\u6162\u4e00\u4e9b\uff0c\u89c2\u5bdf\u8005\u5904\u7406\u4e8b\u4ef6\u5f88\u5feb\u3002\u90a3\u4e48\u89c2\u5bdf\u8005\u5c31\u4f1a\u7b49\u7740\u88ab\u89c2\u5bdf\u8005\u53d1\u9001\u4e8b\u4ef6\u597d\u6bd4\u89c2\u5bdf\u8005\u5728\u7b49\u7c73\u4e0b\u9505\uff0c\u7a0b\u5e8f\u7b49\u5f85\uff09\u3002\n\t<\/li>\n<li>\n\t\t\u88ab\u89c2\u5bdf\u8005\u4ea7\u751f\u4e8b\u4ef6\u7684\u901f\u5ea6\u5f88\u5feb\uff0c\u800c\u89c2\u5bdf\u8005\u5904\u7406\u5f88\u6162\u3002\u90a3\u5c31\u51fa\u95ee\u9898\u4e86\uff0c\u5982\u679c\u4e0d\u4f5c\u5904\u7406\u7684\u8bdd\uff0c\u4e8b\u4ef6\u4f1a\u5806\u79ef\u8d77\u6765\uff0c\u6700\u7ec8\u6324\u7206\u4f60\u7684\u5185\u5b58\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u5d29\u6e83\u3002\uff08\u597d\u6bd4\u88ab\u89c2\u5bdf\u8005\u751f\u4ea7\u7684\u5927\u7c73\u6ca1\u4eba\u5403\uff0c\u5806\u79ef\u6700\u540e\u5c31\u4f1a\u70c2\u6389\uff09\u3002\u4e3a\u4e86\u65b9\u4fbf\u4e0b\u9762\u7406\u89e3Mono\u548cFlux\uff0c\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3aPublisher\uff08\u53d1\u5e03\u8005\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3a\u88ab\u89c2\u5bdf\u8005\uff09\u4e3b\u52a8\u63a8\u9001\u6570\u636e\u7ed9Subscriber\uff08\u8ba2\u9605\u8005\u4e5f\u53ef\u4ee5\u53eb\u89c2\u5bdf\u8005\uff09\uff0c\u5982\u679cPublisher\u53d1\u5e03\u6d88\u606f\u592a\u5feb\uff0c\u8d85\u8fc7\u4e86Subscriber\u7684\u5904\u7406\u901f\u5ea6\uff0c\u5982\u4f55\u5904\u7406\u3002\u8fd9\u65f6\u5c31\u51fa\u73b0\u4e86Backpressure\uff08\u80cc\u538b&#8212;&#8211;\u6307\u5728\u5f02\u6b65\u573a\u666f\u4e2d\uff0c\u88ab\u89c2\u5bdf\u8005\u53d1\u9001\u4e8b\u4ef6\u901f\u5ea6\u8fdc\u5feb\u4e8e\u89c2\u5bdf\u8005\u7684\u5904\u7406\u901f\u5ea6\u7684\u60c5\u51b5\u4e0b\uff0c\u4e00\u79cd\u544a\u8bc9\u4e0a\u6e38\u7684\u88ab\u89c2\u5bdf\u8005\u964d\u4f4e\u53d1\u9001\u901f\u5ea6\u7684\u7b56\u7565\uff09\n\t<\/li>\n<\/ul>\n<p>\n\tMono \u5b9e\u73b0\u4e86 Publisher \u63a5\u53e3\uff0c\u4f46\u662f\u901a\u8fc7\u67e5\u770b\u6e90\u7801\uff0c\u53d1\u73b0\u5b83\u662f\u4e00\u4e2a\u62bd\u8c61\u7c7b\u3002Mono \u91cc\u9762\u6709\u5f88\u591a API\uff0c\u5173\u4e8e\u8fd9\u4e9b API \u7684\u89e3\u91ca\u5982\u4e0b\uff1a\n<\/p>\n<ul>\n<li>\n\t\tempty()\uff1a\u521b\u5efa\u4e00\u4e2a\u4e0d\u5305\u542b\u4efb\u4f55\u5143\u7d20\uff0c\u53ea\u53d1\u5e03\u7ed3\u675f\u6d88\u606f\u7684\u5e8f\u5217\u3002\n\t<\/li>\n<li>\n\t\tjust()\uff1a\u53ef\u4ee5\u6307\u5b9a\u5e8f\u5217\u4e2d\u5305\u542b\u7684\u5168\u90e8\u5143\u7d20\u3002\u521b\u5efa\u51fa\u6765\u7684 Mono\u5e8f\u5217\u5728\u53d1\u5e03\u8fd9\u4e9b\u5143\u7d20\u4e4b\u540e\u4f1a\u81ea\u52a8\u7ed3\u675f\u3002\n\t<\/li>\n<li>\n\t\tjustOrEmpty()\uff1a\u4ece\u4e00\u4e2a Optional \u5bf9\u8c61\u6216\u53ef\u80fd\u4e3a null \u7684\u5bf9\u8c61\u4e2d\u521b\u5efa Mono\u3002\u53ea\u6709 Optional \u5bf9\u8c61\u4e2d\u5305\u542b\u503c\u6216\u5bf9\u8c61\u4e0d\u4e3a null \u65f6\uff0cMono \u5e8f\u5217\u624d\u4ea7\u751f\u5bf9\u5e94\u7684\u5143\u7d20\u3002\n\t<\/li>\n<li>\n\t\terror(Throwable error)\uff1a\u521b\u5efa\u4e00\u4e2a\u53ea\u5305\u542b\u9519\u8bef\u6d88\u606f\u7684\u5e8f\u5217\u3002\n\t<\/li>\n<li>\n\t\tnever()\uff1a\u521b\u5efa\u4e00\u4e2a\u4e0d\u5305\u542b\u4efb\u4f55\u6d88\u606f\u901a\u77e5\u7684\u5e8f\u5217\u3002\n\t<\/li>\n<li>\n\t\tfromCallable()\u3001fromCompletionStage()\u3001fromFuture()\u3001fromRunnable()\u548c fromSupplier()\uff1a\u5206\u522b\u4ece Callable\u3001CompletionStage\u3001CompletableFuture\u3001Runnable \u548c Supplier \u4e2d\u521b\u5efa Mono\u3002\n\t<\/li>\n<li>\n\t\tdelay(Duration duration)\u548c delayMillis(long duration)\uff1a\u521b\u5efa\u4e00\u4e2a Mono \u5e8f\u5217\uff0c\u5728\u6307\u5b9a\u7684\u5ef6\u8fdf\u65f6\u95f4\u4e4b\u540e\uff0c\u4ea7\u751f\u6570\u5b57 0 \u4f5c\u4e3a\u552f\u4e00\u503c\u3002\n\t<\/li>\n<li>\n\t\tcreate()\uff1a\u901a\u8fc7 create()\u65b9\u6cd5\u6765\u4f7f\u7528 MonoSink \u6765\u521b\u5efa Mono\u3002\n\t<\/li>\n<\/ul>\n<p>\n\tAPI \u4f7f\u7528\u6848\u4f8b\u5982\u4e0b\u6240\u793a\u3002\n<\/p>\n<pre class=\"brush:java;\">\r\n\/\/empty()\uff1a\u521b\u5efa\u4e00\u4e2a\u4e0d\u5305\u542b\u4efb\u4f55\u5143\u7d20\uff0c\u53ea\u53d1\u5e03\u7ed3\u675f\u6d88\u606f\u7684\u5e8f\u5217\r\nMono.empty().subscribe(System.out::println);\r\n\/\/just()\uff1a\u53ef\u4ee5\u6307\u5b9a\u5e8f\u5217\u4e2d\u5305\u542b\u7684\u5168\u90e8\u5143\u7d20\u3002\u521b\u5efa\u51fa\u6765\u7684 Mono\u5e8f\u5217\u5728\u53d1\u5e03\u8fd9\u4e9b\u5143\u7d20\u4e4b\u540e\u4f1a\u81ea\u52a8\u7ed3\u675f\u3002\r\nMono.just(&quot;www.xttblog.com&quot;).subscribe(System.out::println);\r\n\/\/ustOrEmpty()\uff1a\u4ece\u4e00\u4e2a Optional \u5bf9\u8c61\u6216\u53ef\u80fd\u4e3a null \u7684\u5bf9\u8c61\u4e2d\u521b\u5efa Mono\u3002\r\n\/\/\u53ea\u6709 Optional \u5bf9\u8c61\u4e2d\u5305\u542b\u503c\u6216\u5bf9\u8c61\u4e0d\u4e3a null \u65f6\uff0cMono \u5e8f\u5217\u624d\u4ea7\u751f\u5bf9\u5e94\u7684\u5143\u7d20\u3002\r\nMono.justOrEmpty(null).subscribe(System.out::println);\r\nMono.justOrEmpty(&quot;\u4e1a\u4f59\u8349&quot;).subscribe(System.out::println);\r\nMono.justOrEmpty(Optional.of(&quot;\u4e1a\u4f59\u8349&quot;)).subscribe(System.out::println);\r\n\/\/error(Throwable error)\uff1a\u521b\u5efa\u4e00\u4e2a\u53ea\u5305\u542b\u9519\u8bef\u6d88\u606f\u7684\u5e8f\u5217\u3002\r\nMono.error(new RuntimeException(&quot;error&quot;)).subscribe(System.out::println, System.err::println);\r\n\/\/never()\uff1a\u521b\u5efa\u4e00\u4e2a\u4e0d\u5305\u542b\u4efb\u4f55\u6d88\u606f\u901a\u77e5\u7684\u5e8f\u5217\u3002\r\nMono.never().subscribe(System.out::println);\r\n\/\/\u901a\u8fc7 create()\u65b9\u6cd5\u6765\u4f7f\u7528 MonoSink \u6765\u521b\u5efa Mono\u3002\r\nMono.create(sink -&gt; sink.success(&quot;\u4e1a\u4f59\u8349&quot;)).subscribe(System.out::println);\r\n\r\n\/\/\u901a\u8fc7fromRunnable\u521b\u5efa\uff0c\u5e76\u5b9e\u73b0\u5f02\u5e38\u5904\u7406\r\nMono.fromRunnable(() -&gt; {\r\n    System.out.println(&quot;thread run&quot;);\r\n    throw new RuntimeException(&quot;thread run error&quot;);\r\n}).subscribe(System.out::println, System.err::println);\r\n\/\/\u901a\u8fc7fromCallable\u521b\u5efa\r\nMono.fromCallable(() -&gt; &quot;callable run &quot;).subscribe(System.out::println);\r\n\/\/\u901a\u8fc7fromSupplier\u521b\u5efa\r\nMono.fromSupplier(() -&gt; &quot;create from supplier&quot;).subscribe(System.out::println);\r\n\r\n\/\/delay(Duration duration)\u548c delayMillis(long duration)\uff1a\u521b\u5efa\u4e00\u4e2a Mono \u5e8f\u5217\uff0c\u5728\u6307\u5b9a\u7684\u5ef6\u8fdf\u65f6\u95f4\u4e4b\u540e\uff0c\u4ea7\u751f\u6570\u5b57 0 \u4f5c\u4e3a\u552f\u4e00\u503c\u3002\r\nlong start = System.currentTimeMillis();\r\nDisposable disposable = Mono.delay(Duration.ofSeconds(2)).subscribe(n -&gt; {\r\n    System.out.println(&quot;\u751f\u4ea7\u6570\u636e\u6e90\uff1a&quot;+ n);\r\n    System.out.println(&quot;\u5f53\u524d\u7ebf\u7a0bID\uff1a&quot;+ Thread.currentThread().getId() + &quot;,\u751f\u4ea7\u5230\u6d88\u8d39\u8017\u65f6\uff1a&quot;+ (System.currentTimeMillis() - start));\r\n});\r\nSystem.out.println(&quot;\u4e3b\u7ebf\u7a0b&quot;+ Thread.currentThread().getId() + &quot;\u8017\u65f6\uff1a&quot;+ (System.currentTimeMillis() - start));\r\nwhile(!disposable.isDisposed()) { }<\/pre>\n<p>\n\t<img decoding=\"async\" alt=\"\u8ddf\u6211\u5b66 WebFlux\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/wx1.sinaimg.cn\/large\/8fa5dcfcgy1g0bt8ijwogj20e509bmzc.jpg\" style=\"width: 509px;height: 335px\" \/>\n<\/p>\n<p>\n\t\u672c\u6587\u4e3b\u8981\u662f\u4ecb\u7ecd\u4e86\u4e00\u4e0b Mono \u7c7b\u4e2d\u76f8\u5173 API \u7684\u7528\u6cd5\uff0c\u5173\u4e8e Flux \u7c7b\uff0c\u6211\u4eec\u4e0b\u7ae0\u7ee7\u7eed\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=3885\">WebFlux \u4e4b Mono API \u6559\u7a0b<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u524d\u9762\u5199\u4e86\u4e00\u4e9b WebFlux \u65b9\u9762\u7684\u6559\u7a0b\uff0c\u53d1\u73b0\u5f88\u591a\u4eba\u641c\u7d22\u5230\u4e86\u6211\u7684\u6587\u7ae0\uff0c\u5e0c\u671b\u6211\u80fd\u7ee7\u7eed\u5199\u4e00\u4e9b\u6559\u7a0b\u3002\u4e8e\u662f\u4fbf\u6709\u4e86\u672c\u6587\u3002 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1710,1715,1709,1868,1701],"class_list":["post-3885","post","type-post","status-publish","format-standard","hentry","category-java","tag-flux","tag-handlerfilterfunction","tag-mono","tag-serverresponse","tag-webflux"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3885"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3885\/revisions"}],"predecessor-version":[{"id":3886,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3885\/revisions\/3886"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}