{"id":1285,"date":"2024-08-03T16:30:58","date_gmt":"2024-08-03T08:30:58","guid":{"rendered":"http:\/\/codermr.com\/?p=1285"},"modified":"2024-08-04T01:55:27","modified_gmt":"2024-08-03T17:55:27","slug":"flux_source_code1","status":"publish","type":"post","link":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/","title":{"rendered":"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09"},"content":{"rendered":"\n<p>\u8fd9\u4e24\u5929\u56e0\u4e3a\u8981\u89e3\u51b3 springcloud gateway \u7f51\u5173\u4e2d\u7684\u4e00\u4e9b\u95ee\u9898\uff0c\u53bb\u5b66\u4e60\u4e86\u4e00\u4e9b Flux\u3001Mono \u7b49\u77e5\u8bc6\u70b9\uff0c\u672c\u6587\u8bb0\u5f55\u4e00\u4e0b Flux \u6e90\u7801\u7684\u7b80\u5355\u5206\u6790\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Flux \u662f\u4ec0\u4e48\uff1f<\/h2>\n\n\n\n<p><a href=\"https:\/\/projectreactor.io\/docs\/core\/release\/api\/\">\u5b98\u7f51<\/a>\u7684\u89e3\u91ca\u662f\uff1a<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>A Reactive Streams <a href=\"https:\/\/www.reactive-streams.org\/reactive-streams-1.0.3-javadoc\/org\/reactivestreams\/Publisher.html?is-external=true\"><code>Publisher<\/code><\/a> with rx operators that emits 0 to N elements, and then completes (successfully or with an error).<\/p>\n<\/blockquote>\n\n\n\n<p>&#8211; Flux \u8868\u793a\u7684\u662f\u5305\u542b\u96f6\u5230\u591a\u4e2a\u5143\u7d20\u7684\u5f02\u6b65\u5e8f\u5217\u3002<\/p>\n\n\n\n<p>&#8211; \u5b83\u53ef\u4ee5\u53d1\u51fa 0 \u5230 N \u4e2a\u5143\u7d20\uff0c\u5e76\u5728\u5b8c\u6210\u65f6\u53d1\u51fa\u5b8c\u6210\u4fe1\u53f7\u6216\u9519\u8bef\u4fe1\u53f7\u3002<\/p>\n\n\n\n<p>&#8211; Flux \u53ef\u4ee5\u7528\u4e8e\u8868\u793a\u5f02\u6b65\u7684\u591a\u4e2a\u503c\u7684\u5e8f\u5217\uff0c\u6bd4\u5982\u96c6\u5408\u3001\u6570\u7ec4\u3001\u6570\u636e\u5e93\u67e5\u8be2\u3001\u7f51\u7edc\u6570\u636e\u7b49\u3002<\/p>\n\n\n\n<p>&#8211; Flux \u53ef\u4ee5\u88ab\u8ba2\u9605\uff0c\u5f53\u6709\u6570\u636e\u4ea7\u751f\u65f6\uff0c\u4f1a\u5c06\u6570\u636e\u63a8\u9001\u7ed9\u8ba2\u9605\u8005\u3002<\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">Flux \u5b9e\u73b0\u4e86 Publisher \u63a5\u53e3\uff0c<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">Flu<\/mark><\/strong>x \u5c31\u662f\u4e00\u4e2a Publisher \u3002<\/mark><\/strong><\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">\u6211\u4eec\u770b\u770b Publisher \u63a5\u53e3\uff1a<\/mark><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Publisher \u63a5\u53e3<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>\npublic interface Publisher&lt;T&gt; {\n    public void subscribe(Subscriber&lt;? super T&gt; s);\n}<\/code><\/pre>\n\n\n\n<p>Publisher \u63a5\u53e3\u4e2d\u53ea\u6709\u4e00\u4e2a subscribe \u65b9\u6cd5\uff0c<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">subscribe \u662f\u4e00\u4e2a\u52a8\u8bcd<\/mark><\/strong>\uff0c\u610f\u601d\u662f\u901a\u8fc7\u8be5\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5f80 Publisher \u4e0a\u9762\u8ba2\u9605\u4e8b\u4ef6\uff08&#8221;\u8ba2\u9605\u4e8b\u4ef6&#8221;\u7684\u610f\u601d\u5c31\u662f\u60f3\u5bf9 Publisher \u4e2d\u7684\u6570\u636e\u505a\u54ea\u4e9b\u5904\u7406\uff09\u3002<\/p>\n\n\n\n<p>\u8ba2\u9605\u4ec0\u4e48\u4e8b\u4ef6\u5462\uff1f\u4f60\u81ea\u5df1\u5b9e\u73b0 Subscriber \u63a5\u53e3\uff0c<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Subscriber \u5c31\u662f&#8221;\u8981\u8ba2\u9605\u7684\u4e8b\u4ef6\u903b\u8f91&#8221; <\/mark><\/strong>\uff0c\u4f60\u7684\u903b\u8f91\u5199\u8fd9\u91cc\u3002\u7136\u540e Publisher \u4f1a\u8c03\u7528 Subscriber \u4e2d\u7684 <code>onSubcribe(Subscription)<\/code> \u65b9\u6cd5\uff01<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u5176\u5b9e\u51c6\u786e\u70b9\u53ef\u4ee5\u8bf4\uff1aSubscriber \u4e2d\u7684 onSubcribe(Subscription) \u65b9\u6cd5\u5c31\u662f&#8221;\u8981\u8ba2\u9605\u7684\u4e8b\u4ef6\u903b\u8f91&#8221;\uff0c<\/mark><\/strong>\u56e0\u4e3a<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u4e8b\u4ef6\u903b\u8f91\u5c31\u662f\u5728 <code>onSubcribe(Subscription)<\/code> \u65b9\u6cd5\u4e2d\u5199\u7684<\/mark>\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Subscriber<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"286\" height=\"175\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-9.png\" alt=\"\" class=\"wp-image-1295\"\/><\/a><\/figure>\n\n\n\n<p>Subscriber \u662f Publisher \u63a5\u53e3\u4e2d subscribe \u65b9\u6cd5\u7684\u5165\u53c2\u7c7b\u578b\u3002\u5f53\u4f60\u5199\u4e86\uff1a<code>flux0.subscribe(ele -&gt; { System.out.println(ele * 2); });<\/code> \u540e\uff0c <code>ele -&gt; { System.out.println(ele * 2); }<\/code> \u4f1a\u88ab\u5c01\u88c5\u6210 Subscriber \u5bf9\u8c61\u3002<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u6240\u4ee5\u62ff\u5230 Subscriber \u5bf9\u8c61\u5c31\u53ef\u4ee5\u5bf9\u6570\u636e\u6d41\u8fdb\u884c\u5904\u7406\u3002<\/mark><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Subscription<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"237\" height=\"135\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-14.png\" alt=\"\" class=\"wp-image-1304\"\/><\/a><\/figure>\n\n\n\n<p>Subscriber \u7c7b\u4e2d\u7684 onSubcribe(Subscription) \u65b9\u6cd5\u7684\u5165\u53c2\u662f Subscription \uff0cSubscription\u53c8\u662f\u4ec0\u4e48\u5462\uff1f<\/p>\n\n\n\n<p>\u4e0a\u9762\u8bf4\u4e86\uff0c<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Subscriber \u5c31\u662f&#8221;\u8981\u8ba2\u9605\u7684\u4e8b\u4ef6\u903b\u8f91&#8221; <\/mark><\/strong>\uff0c<mark>\u4e8b\u4ef6\u903b\u8f91\u5c31\u662f\u5728 <code>onSubcribe(Subscription)<\/code> \u65b9\u6cd5\u4e2d\u5199\u7684<\/mark>\uff0c\u5176\u5b9e\u518d\u51c6\u786e\u70b9\u8bf4\uff0c<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">&#8220;\u4e8b\u4ef6\u7684\u5904\u7406\u903b\u8f91&#8221; \u662f\u5728 <mark><code>Subscription<\/code><\/mark> \u4e2d\u5b9e\u73b0\u7684<\/mark><\/strong>\u3002<\/p>\n\n\n\n<p>Subscription \u5c31\u662f\u5904\u7406\u6570\u636e\u7684\uff0c\u5b83\u4e3a\u4ec0\u4e48\u80fd\u5904\u7406\u6570\u636e\u5462\uff1f<\/p>\n\n\n\n<p>\u56e0\u4e3a\uff1a\uff081\uff09Subscription \u5185\u90e8\u6709\u4e0a\u9762\u7684 1,2,3 \u6570\u636e\u3002\uff082\uff09Subscription \u5185\u90e8\u62ff\u5230\u4e86Subscriber \u5bf9\u8c61\uff0c\u4e0a\u9762\u8bf4\u4e86<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">\u62ff\u5230 Subscriber \u5bf9\u8c61\u5c31\u53ef\u4ee5\u5bf9\u6570\u636e\u6d41\u8fdb\u884c\u5904\u7406<\/mark><\/strong>\u3002 <\/p>\n\n\n\n<p>Subscription \u5b83\u7684 request \u65b9\u6cd5\u4f1a\u5faa\u73af\u5904\u7406\u8fd9\u4e9b\u6570\u636e\uff0c\u6bcf\u6b21\u5904\u7406\u6570\u636e\u90fd\u4f1a\u8c03\u7528 Subscriber \u5bf9\u8c61\u4e2d\u7684 onNext(..) \u65b9\u6cd5\uff0c\u800c Subscriber \u5bf9\u8c61\u7684 onNext(..) \u4f1a\u8c03\u7528 <code>ele -&gt; { System.out.println(ele * 2); }<\/code> \u5904\u7406\u6570\u636e\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5 Subscription \u7684 request \u65b9\u6cd5\u662f\u4e00\u4e2a&#8221;\u65f6\u95f4\u70b9&#8221;\uff0c\u4ece\u6b64\u523b\u5f00\u59cb\uff0c\u5904\u7406\u6570\u636e\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Flux\u3001Publisher\u3001Subscriber\u3001Subscription \u7684\u5173\u7cfb<\/h2>\n\n\n\n<p>Flux \u5b9e\u73b0\u4e86 Publisher \u63a5\u53e3\u3002Subscriber \u662f Publisher \u63a5\u53e3\u4e2d\u7684 subscribe \u65b9\u6cd5\u7684\u5165\u53c2\u7c7b\u578b\u3002<\/p>\n\n\n\n<p>\u5f53\u4f60\u5199\u4e86\uff1a<code>flux0.subscribe(ele -&gt; { System.out.println(ele * 2); });<\/code> \u540e\uff0c<code>.subscribe(ele -&gt; { System.out.println(ele * 2); })<\/code> \u5c31\u662f\u5bf9 Publisher \u63a5\u53e3\u4e2d\u7684 subscribe \u65b9\u6cd5\u7684\u5b9e\u73b0\u3002<\/p>\n\n\n\n<p>ele -&gt; { System.out.println(ele * 2); } \u4f1a\u88ab\u5c01\u88c5\u6210 Subscriber \u5bf9\u8c61\uff0c\u5f53\u6267\u884c <code>flux0.subscribe(ele -&gt; { System.out.println(ele * 2); });<\/code> \u7684\u65f6\u5019\uff0c\u5c31\u4f1a\u89e6\u53d1\u4e2d\u7684 Subscriber  \u4e2d\u7684 <code>onSubscibe(Subscription)<\/code> \u65b9\u6cd5\u7684\u6267\u884c\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e3e\u4f8b\u8bf4\u660e<\/h2>\n\n\n\n<p>\u5148\u4ece\u4e00\u4e2a\u6700\u7b80\u5355\u7684\u4f7f\u7528 Flux \u7684 demo \u8bf4\u8d77\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Flux&lt;Integer&gt; flux0 = Flux.just(1, 2, 3);\nflux0.subscribe(ele -&gt; {\n            System.out.println(ele * 2);\n        });\/\/ \u8fd9\u4e2a Consumer \u4f1a\u88ab\u5305\u88c5\u6210 Publisher \u63a5\u53e3\u4e2d subscribe \u65b9\u6cd5\u7684\u5165\u53c2 Subscriber<\/code><\/pre>\n\n\n\n<p>\u5982\u4e0a\u4ee3\u7801\u3002\u9996\u5148 Flux \u662f\u4e00\u4e2a\u62bd\u8c61\u7c7b\uff0c\u5b83\u63d0\u4f9b\u4e86\u6570\u636e\u5904\u7406\u7684\u901a\u7528\u65b9\u6cd5\uff0cFluxArray \u662f\u7ee7\u627f\u81ea Flux \u7684\u4e00\u4e2a\u7c7b\uff0c<code>Flux.just(1, 2, 3)<\/code>\u5176\u5b9e\u5c31\u662f\u521b\u5efa\u4e86\u4e00\u4e2a FluxArray \u5bf9\u8c61\uff0cFluxArray \u4e2d\u6709\u4e00\u4e2a\u6570\u7ec4\uff0c\u7528\u4e8e\u5b58\u653e\u6bd4\u5982\u4e0a\u9762\u7684 1,2,3 \u8fd9\u4e9b\u6570\u636e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"569\" height=\"190\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image.png\" alt=\"\" class=\"wp-image-1286\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image.png 569w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-300x100.png 300w\" sizes=\"(max-width: 569px) 100vw, 569px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u7b2c\u4e00\u6b65\uff08\u4f4d\u4e8e Flux \u7c7b\u4e2d\uff09\uff1a\u521b\u5efa Flux \u5bf9\u8c61\uff1a<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"493\" height=\"18\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-1.png\" alt=\"\" class=\"wp-image-1287\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-1.png 493w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-1-300x11.png 300w\" sizes=\"(max-width: 493px) 100vw, 493px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u7b2c\u4e8c\u6b65\uff08\u4f4d\u4e8e Flux \u7c7b\u4e2d\uff09\uff1a\u5b9e\u9645\u521b\u5efa\u7684\u662f FluxArray \u5bf9\u8c61<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"439\" height=\"152\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-2.png\" alt=\"\" class=\"wp-image-1288\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-2.png 439w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-2-300x104.png 300w\" sizes=\"(max-width: 439px) 100vw, 439px\" \/><\/a><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\u4e0a\u9762 1110 \u884c\u662f\u521b\u5efa\u4e86\u4e00\u4e2a FluxArray \u5bf9\u8c61\u4f5c\u4e3a\u53c2\u6570\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"188\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-3.png\" alt=\"\" class=\"wp-image-1289\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-3.png 881w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-3-300x64.png 300w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-3-768x164.png 768w\" sizes=\"(max-width: 881px) 100vw, 881px\" \/><\/a><\/figure>\n\n\n\n<p>\u4e0a\u9762 10556 \u884c\u53ef\u4ee5\u770b\u5230\u8fd4\u56de\u4e86\u5728\u7b2c\u4e8c\u6b65\u4e2d\u521b\u5efa\u7684 FluxArray \u5bf9\u8c61 \u3002\u6240\u4ee5\u4e0a\u9762\u7b2c\u4e00\u6b65\u4e2d\u521b\u5efa\u7684\u5bf9\u8c61\u5c31\u662f FluxArray \u5bf9\u8c61\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u7b2c\u4e09\u6b65\uff08\u4f4d\u4e8e Flux \u7c7b\u4e2d\uff09\uff1a\u8c03\u7528 Flux \u7684 subscribe(&#8230;) \u65b9\u6cd5\uff1a<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"319\" height=\"53\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-4.png\" alt=\"\" class=\"wp-image-1290\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-4.png 319w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-4-300x50.png 300w\" sizes=\"(max-width: 319px) 100vw, 319px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u7b2c\u56db\u6b65\uff1a<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"599\" height=\"70\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-8.png\" alt=\"\" class=\"wp-image-1294\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-8.png 599w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-8-300x35.png 300w\" sizes=\"(max-width: 599px) 100vw, 599px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"171\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-6.png\" alt=\"\" class=\"wp-image-1292\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-6.png 595w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-6-300x86.png 300w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><\/a><\/figure>\n\n\n\n<p>\u7b2c\u4e09\u6b65\u4e2d\u867d\u7136\u6211\u4eec\u5199\u7684\u662f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ele -&gt; {\n            System.out.println(ele * 2);\n        }<\/code><\/pre>\n\n\n\n<p>\u4f46\u5728\u4e0a\u9762\u7b2c 8608 \u884c\u53ef\u4ee5\u770b\u5230\uff0c\u8fd9\u4e2a Consumer \u88ab\u5305\u88c5\u4e86 LambdaSubscriber \u5bf9\u8c61\uff0c\u4e0e\u6b64\u540c\u65f6\uff0cLambdaSubscriber \u7684\u6784\u9020\u5668\u4e2d\u8fd8\u6709\u5176\u4ed6\u4e00\u4e9b\u53c2\u6570\u6bd4\u5982 errorConsumer \u7b49\uff0c\u4f46\u5728\u4e0a\u9762 8475 \u884c\u4f20\u9012\u662f null \u3002<\/p>\n\n\n\n<p>LambdaSubscriber \u5bf9\u8c61\u7ee7\u627f\u4e86  Subscriber \u63a5\u53e3\uff0cSubscriber \u63a5\u53e3\u4e2d\u6709\u8fd9\u4e9b\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"286\" height=\"175\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-9.png\" alt=\"\" class=\"wp-image-1295\"\/><\/a><\/figure>\n\n\n\n<p>\u5f53\u4f60\u8c03\u7528\u4e86 Publisher\uff08\u5982Flux\uff09\u7684 subscribe \u65b9\u6cd5\u4e4b\u540e\uff0c\u5c31\u4f1a\u89e6\u53d1 Subscriber \u4e2d\u7684 onSubscribe(..) \u65b9\u6cd5\u3002\u4e0a\u9762\u8bf4\u4e86\u6211\u4eec\u5199\u7684 Consumer \u88ab\u5305\u88c5\u4e86 LambdaSubscriber \u5bf9\u8c61\uff0c\u6240\u4ee5\u7b2c\u4e09\u6b65\u8c03\u7528\u4e86 Publisher\uff08\u5982Flux\uff09\u7684 subscribe \u65b9\u6cd5\uff0c\u5c31\u4f1a\u89e6\u53d1 LambdaSubscriber \u5bf9\u8c61\u7684 onSubscribe(..) \u65b9\u6cd5\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"429\" height=\"344\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-10.png\" alt=\"\" class=\"wp-image-1297\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-10.png 429w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-10-300x241.png 300w\" sizes=\"(max-width: 429px) 100vw, 429px\" \/><\/a><\/figure>\n\n\n\n<p>\u800c\u4e0a\u9762 105 \u884c\u7684 Subscription \u662f\u4ec0\u4e48\uff0c\u5176\u5b9e\u662f ArraySubscription\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"788\" height=\"228\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-11.png\" alt=\"\" class=\"wp-image-1298\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-11.png 788w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-11-300x87.png 300w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-11-768x222.png 768w\" sizes=\"(max-width: 788px) 100vw, 788px\" \/><\/a><\/figure>\n\n\n\n<p>\u5b83\u4f4d\u4e8e FluxArray \u4e2d\u662f FluxArray \u7684\u4e00\u4e2a\u5185\u90e8\u7c7b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1025\" height=\"816\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-12.png\" alt=\"\" class=\"wp-image-1300\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-12.png 1025w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-12-300x239.png 300w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-12-768x611.png 768w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-12-922x734.png 922w\" sizes=\"(max-width: 1025px) 100vw, 1025px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u7b2c\u4e94\u6b65 \uff1a<\/h2>\n\n\n\n<p>\u7b2c\u56db\u6b65\u5df2\u7ecf\u8bf4\u4e86\uff0c\u8c03\u7528\u4e86 Publisher\uff08\u5982Flux\uff09\u7684 subscribe \u65b9\u6cd5\uff0c\u5c31\u4f1a\u89e6\u53d1 LambdaSubscriber \u5bf9\u8c61\u7684 onSubscribe(..) \u65b9\u6cd5\uff0c\u800c LambdaSubscriber \u5bf9\u8c61\u7684 onSubscribe(..) \u65b9\u6cd5\u7684\u5165\u53c2\u662f ArraySubscription \uff0c LambdaSubscriber \u5bf9\u8c61\u7684 onSubscribe(..) \u65b9\u6cd5\u4e2d 119 \u884c\u8c03\u7528 s.request(..) \uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" width=\"427\" height=\"342\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-13.png\" alt=\"\" class=\"wp-image-1301\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-13.png 427w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-13-300x240.png 300w\" sizes=\"(max-width: 427px) 100vw, 427px\" \/><\/a><\/figure>\n\n\n\n<p>\u4e0a\u9762 119 \u884c\u7684 s \u5176\u5b9e\u5c31\u662f ArraySubscription \u7684 request \u65b9\u6cd5\uff08\u5982\u4e0b\u56fe\uff09\uff0c\u8fd9\u4e2a reqeust \u65b9\u6cd5\u4f1a\u5faa\u73af\u5904\u7406\u6570\u636e\uff0c\u6700\u7ec8\u4f1a LambdaSubscriber \u7684 Conumer\uff08\u5176\u5b9e\u5c31\u662f\u6211\u4eec\u5199\u7684 <code>ele -&gt; { System.out.println(ele * 2); }<\/code>\uff09\u5904\u7406\u6570\u636e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1006\" height=\"689\" src=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-15.png\" alt=\"\" class=\"wp-image-1308\" srcset=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-15.png 1006w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-15-300x205.png 300w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-15-768x526.png 768w, http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/image-15-922x631.png 922w\" sizes=\"(max-width: 1006px) 100vw, 1006px\" \/><\/a><\/figure>\n\n\n\n<p>\u5904\u7406\u5b8c\u4e4b\u540e\uff0c\u8c03\u7528\u4e0a\u9762 177 \u884c\u7684 onComplete() \u65b9\u6cd5\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u6ce8\u610f\uff0c\u4f60\u5bf9 Flux \u4e2d\u6570\u636e\u8fdb\u884c\u8ba2\u9605\u3001\u6216\u8005\u4f7f\u7528 .map(..) \u65b9\u6cd5\u8fdb\u884c\u5904\u7406\uff0c\u90fd\u4e0d\u4f1a\u6539\u53d8 Flux \u4e2d\u7684\u539f\u59cb\u6570\u636e\uff0c.map(..) \u65b9\u6cd5\u4f1a\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684  Flux \u5bf9\u8c61\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u4e24\u5929\u56e0\u4e3a\u8981\u89e3\u51b3 springcloud gateway \u7f51\u5173\u4e2d\u7684\u4e00\u4e9b\u95ee\u9898\uff0c\u53bb\u5b66\u4e60\u4e86\u4e00\u4e9b Flux\u3001Mono &#8230;<\/p>\n","protected":false},"author":1,"featured_media":1311,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[62],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09 - \u7801\u5148\u751f\u7684\u535a\u5ba2<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09 - \u7801\u5148\u751f\u7684\u535a\u5ba2\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u4e24\u5929\u56e0\u4e3a\u8981\u89e3\u51b3 springcloud gateway \u7f51\u5173\u4e2d\u7684\u4e00\u4e9b\u95ee\u9898\uff0c\u53bb\u5b66\u4e60\u4e86\u4e00\u4e9b Flux\u3001Mono ...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7801\u5148\u751f\u7684\u535a\u5ba2\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-03T08:30:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-03T17:55:27+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/Reactor_Flux1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"358\" \/>\n\t<meta property=\"og:image:height\" content=\"358\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"\u7801\u5148\u751f\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/mrcode2021\" \/>\n<meta name=\"twitter:site\" content=\"@mrcode2021\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u7801\u5148\u751f\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/\"},\"author\":{\"name\":\"\u7801\u5148\u751f\",\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"headline\":\"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09\",\"datePublished\":\"2024-08-03T08:30:58+00:00\",\"dateModified\":\"2024-08-03T17:55:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/\"},\"wordCount\":164,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"keywords\":[\"flux\"],\"articleSection\":[\"JAVA\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/\",\"url\":\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/\",\"name\":\"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09 - \u7801\u5148\u751f\u7684\u535a\u5ba2\",\"isPartOf\":{\"@id\":\"http:\/\/codermr.com\/#website\"},\"datePublished\":\"2024-08-03T08:30:58+00:00\",\"dateModified\":\"2024-08-03T17:55:27+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/codermr.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/codermr.com\/#website\",\"url\":\"http:\/\/codermr.com\/\",\"name\":\"\u7801\u5148\u751f\u7684\u535a\u5ba2\",\"description\":\"\u6b22 \u8fce \u4e0b \u8f7d \u6211 \u5f00 \u53d1 \u7684 \u5404 \u7aef \u8f6f \u4ef6 \u548c APP\",\"publisher\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/codermr.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf\",\"name\":\"\u7801\u5148\u751f\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg\",\"contentUrl\":\"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg\",\"width\":400,\"height\":400,\"caption\":\"\u7801\u5148\u751f\"},\"logo\":{\"@id\":\"http:\/\/codermr.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/codermr.com\",\"https:\/\/twitter.com\/https:\/\/twitter.com\/mrcode2021\"],\"url\":\"http:\/\/codermr.com\/index.php\/author\/coderma\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09 - \u7801\u5148\u751f\u7684\u535a\u5ba2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/","og_locale":"zh_CN","og_type":"article","og_title":"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09 - \u7801\u5148\u751f\u7684\u535a\u5ba2","og_description":"\u8fd9\u4e24\u5929\u56e0\u4e3a\u8981\u89e3\u51b3 springcloud gateway \u7f51\u5173\u4e2d\u7684\u4e00\u4e9b\u95ee\u9898\uff0c\u53bb\u5b66\u4e60\u4e86\u4e00\u4e9b Flux\u3001Mono ...","og_url":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/","og_site_name":"\u7801\u5148\u751f\u7684\u535a\u5ba2","article_published_time":"2024-08-03T08:30:58+00:00","article_modified_time":"2024-08-03T17:55:27+00:00","og_image":[{"width":358,"height":358,"url":"http:\/\/codermr.com\/wp-content\/uploads\/2024\/08\/Reactor_Flux1.png","type":"image\/png"}],"author":"\u7801\u5148\u751f","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/mrcode2021","twitter_site":"@mrcode2021","twitter_misc":{"\u4f5c\u8005":"\u7801\u5148\u751f","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/#article","isPartOf":{"@id":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/"},"author":{"name":"\u7801\u5148\u751f","@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"headline":"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09","datePublished":"2024-08-03T08:30:58+00:00","dateModified":"2024-08-03T17:55:27+00:00","mainEntityOfPage":{"@id":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/"},"wordCount":164,"commentCount":0,"publisher":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"keywords":["flux"],"articleSection":["JAVA"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/","url":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/","name":"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09 - \u7801\u5148\u751f\u7684\u535a\u5ba2","isPartOf":{"@id":"http:\/\/codermr.com\/#website"},"datePublished":"2024-08-03T08:30:58+00:00","dateModified":"2024-08-03T17:55:27+00:00","breadcrumb":{"@id":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/codermr.com\/index.php\/2024\/08\/03\/flux_source_code1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/codermr.com\/"},{"@type":"ListItem","position":2,"name":"Flux \u6e90\u7801\u5206\u6790\uff08\u4e00\uff09"}]},{"@type":"WebSite","@id":"http:\/\/codermr.com\/#website","url":"http:\/\/codermr.com\/","name":"\u7801\u5148\u751f\u7684\u535a\u5ba2","description":"\u6b22 \u8fce \u4e0b \u8f7d \u6211 \u5f00 \u53d1 \u7684 \u5404 \u7aef \u8f6f \u4ef6 \u548c APP","publisher":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/codermr.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/codermr.com\/#\/schema\/person\/39016e15c79e4f02d1ed3a64688619bf","name":"\u7801\u5148\u751f","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/codermr.com\/#\/schema\/person\/image\/","url":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg","contentUrl":"http:\/\/codermr.com\/wp-content\/uploads\/2023\/02\/wukong.jpg","width":400,"height":400,"caption":"\u7801\u5148\u751f"},"logo":{"@id":"http:\/\/codermr.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/codermr.com","https:\/\/twitter.com\/https:\/\/twitter.com\/mrcode2021"],"url":"http:\/\/codermr.com\/index.php\/author\/coderma\/"}]}},"_links":{"self":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1285"}],"collection":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/comments?post=1285"}],"version-history":[{"count":11,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1285\/revisions"}],"predecessor-version":[{"id":1337,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/posts\/1285\/revisions\/1337"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/media\/1311"}],"wp:attachment":[{"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/media?parent=1285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/categories?post=1285"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/codermr.com\/index.php\/wp-json\/wp\/v2\/tags?post=1285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}