{"id":33057,"date":"2025-04-26T11:25:27","date_gmt":"2025-04-26T03:25:27","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/33057.html"},"modified":"2025-04-26T11:25:27","modified_gmt":"2025-04-26T03:25:27","slug":"spring-ai-%e4%b8%ad%e5%b8%b8%e8%a7%81%e4%bb%a3%e7%a0%81%e8%a7%a3%e8%af%bb-%e7%94%a8-webflux-%e5%81%9a%e9%ab%98%e5%b9%b6%e5%8f%91%e7%9a%84%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%88%e5%85%a5%e9%97%a84","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/33057.html","title":{"rendered":"spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09"},"content":{"rendered":"<h2>\u65e0\u8bba\u662f\u5bf9\u63a5\u7b2c\u4e09\u65b9\u5e73\u53f0\u8981\u6c42\u6211\u4eec\u7684\u63a5\u53e3\u8981\u505a\u5230\u9ad8\u5e76\u53d1\u3001\u8fd8\u662f\u81ea\u5df1\u8981\u6c42\u7684\u9ad8\u5e76\u53d1\u5e73\u53f0&#xff0c;\u90fd\u6709\u54ea\u4e9b\u89e3\u51b3\u65b9\u6848 \u6bd4\u5982\u8981\u6c42\u590d\u6742\u4e1a\u52a1\u903b\u8f91\u7684 200\/\u6bcf\u79d2<\/h2>\n<h3>\u5e38\u7528\u65b9\u6cd5&#xff1a;\u589e\u52a0\u786c\u4ef6\u8d44\u6e90<\/h3>\n<h3>\u6700\u5408\u9002\u7684\u65b9\u6cd5 \u8fd8\u662f\u8981\u5728\u4ee3\u7801\u8d28\u91cf\u4e0a \u600e\u4e48\u80fd\u4fdd\u8bc1\u505a\u5230\u9ad8\u5e76\u53d1\u3002<\/h3>\n<h3>\u4e00&#xff1a;\u5177\u4f53\u600e\u4e48\u505a\u5462\u3002\u90a3\u6211\u4eec\u5c31\u770b\u770b spring \u7684webFlux \u529f\u80fd&#xff0c;\u770b\u770b\u4e0b\u9762\u7684\u4ee3\u7801 \u5b83\u4e3a\u4ec0\u4e48\u5c31\u80fd\u505a\u5230\u9ad8\u5e76\u53d1<\/h3>\n<p> <span class=\"token comment\">\/\/ \u83b7\u53d6\u6240\u6709\u7528\u6237&#xff08;\u8fd4\u56de\u7528\u6237\u5217\u8868\u6d41&#xff09;<\/span><br \/>\n <span class=\"token annotation punctuation\">&#064;GetMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/users&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">Flux<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> <span class=\"token function\">getAllUsers<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n     <span class=\"token keyword\">return<\/span> userRepository<span class=\"token punctuation\">.<\/span><span class=\"token function\">findAll<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n <span class=\"token punctuation\">}<\/span><\/p>\n<h3>\u4e8c&#xff1a;webFlux \u5b8c\u6574\u7684\u4f8b\u5b50<\/h3>\n<h4>Spring WebFlux \u901a\u4fd7\u793a\u4f8b&#xff08;\u4ee5 User \u4e3a\u4f8b&#xff09;<\/h4>\n<p>\u7528\u4e00\u4e2a\u7b80\u5355\u7684\u201c\u7528\u6237\u7ba1\u7406\u201d\u573a\u666f&#xff0c;\u89e3\u91ca Spring WebFlux \u7684\u6838\u5fc3\u7528\u6cd5&#xff0c;\u5047\u8bbe\u4f60\u6709\u4e00\u4e2a\u7528\u6237\u4fe1\u606f\u63a5\u53e3\u3002<\/p>\n<hr \/>\n<h5>\u7b2c\u4e00\u6b65&#xff1a;\u5b9a\u4e49\u7528\u6237\u7c7b&#xff08;User&#xff09;<\/h5>\n<p><span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">User<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">private<\/span> <span class=\"token class-name\">String<\/span> id<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">private<\/span> <span class=\"token class-name\">String<\/span> name<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">private<\/span> <span class=\"token keyword\">int<\/span> age<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u7701\u7565\u6784\u9020\u65b9\u6cd5\u3001Getter\/Setter<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<hr \/>\n<h5>\u7b2c\u4e8c\u6b65&#xff1a;\u521b\u5efa\u54cd\u5e94\u5f0f Repository&#xff08;\u6a21\u62df\u6570\u636e&#xff09;<\/h5>\n<p>\u8fd9\u91cc\u7528\u5185\u5b58\u5b58\u50a8\u6a21\u62df\u6570\u636e\u5e93&#xff0c;\u5b9e\u9645\u5f00\u53d1\u4e2d\u53ef\u7528 MongoDB Reactive \u7b49\u771f\u6b63\u7684\u54cd\u5e94\u5f0f\u6570\u636e\u5e93\u3002<\/p>\n<p><span class=\"token annotation punctuation\">&#064;Repository<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">UserRepository<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u6a21\u62df\u4e00\u4e2a\u7528\u6237\u5217\u8868<\/span><br \/>\n    <span class=\"token keyword\">private<\/span> <span class=\"token keyword\">final<\/span> <span class=\"token class-name\">List<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> users <span class=\"token operator\">&#061;<\/span> <span class=\"token class-name\">Arrays<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">asList<\/span><span class=\"token punctuation\">(<\/span><br \/>\n        <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">User<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;1&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u5f20\u4e09&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">25<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">,<\/span><br \/>\n        <span class=\"token keyword\">new<\/span> <span class=\"token class-name\">User<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;2&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;\u674e\u56db&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token number\">30<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u6839\u636eID\u67e5\u627e\u7528\u6237&#xff08;\u8fd4\u56de Mono&#xff09;<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">Mono<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> <span class=\"token function\">findById<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">String<\/span> id<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token class-name\">Mono<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">justOrEmpty<\/span><span class=\"token punctuation\">(<\/span><br \/>\n            users<span class=\"token punctuation\">.<\/span><span class=\"token function\">stream<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">filter<\/span><span class=\"token punctuation\">(<\/span>user <span class=\"token operator\">-&gt;<\/span> user<span class=\"token punctuation\">.<\/span><span class=\"token function\">getId<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">equals<\/span><span class=\"token punctuation\">(<\/span>id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token punctuation\">.<\/span><span class=\"token function\">findFirst<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u67e5\u627e\u6240\u6709\u7528\u6237&#xff08;\u8fd4\u56de Flux&#xff09;<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">Flux<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> <span class=\"token function\">findAll<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token class-name\">Flux<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">fromIterable<\/span><span class=\"token punctuation\">(<\/span>users<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u6dfb\u52a0\u7528\u6237&#xff08;\u6a21\u62df\u4fdd\u5b58&#xff09;<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">Mono<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> <span class=\"token function\">save<\/span><span class=\"token punctuation\">(<\/span><span class=\"token class-name\">User<\/span> user<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        users<span class=\"token punctuation\">.<\/span><span class=\"token function\">add<\/span><span class=\"token punctuation\">(<\/span>user<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token class-name\">Mono<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">just<\/span><span class=\"token punctuation\">(<\/span>user<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<hr \/>\n<h5>\u7b2c\u4e09\u6b65&#xff1a;\u7f16\u5199 WebFlux \u63a7\u5236\u5668&#xff08;\u6ce8\u89e3\u9a71\u52a8&#xff09;<\/h5>\n<p>\u4f7f\u7528 &#064;RestController \u548c &#064;GetMapping&#xff0c;\u7c7b\u4f3c Spring MVC&#xff0c;\u4f46\u8fd4\u56de\u7684\u662f Mono \u6216 Flux\u3002<\/p>\n<p><span class=\"token annotation punctuation\">&#064;RestController<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">UserController<\/span> <span class=\"token punctuation\">{<\/span><\/p>\n<p>    <span class=\"token annotation punctuation\">&#064;Autowired<\/span><br \/>\n    <span class=\"token keyword\">private<\/span> <span class=\"token class-name\">UserRepository<\/span> userRepository<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u6839\u636eID\u83b7\u53d6\u7528\u6237&#xff08;\u8fd4\u56de\u5355\u4e2a\u7528\u6237&#xff09;<\/span><br \/>\n    <span class=\"token annotation punctuation\">&#064;GetMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/users\/{id}&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">Mono<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> <span class=\"token function\">getUserById<\/span><span class=\"token punctuation\">(<\/span><span class=\"token annotation punctuation\">&#064;PathVariable<\/span> <span class=\"token class-name\">String<\/span> id<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> userRepository<span class=\"token punctuation\">.<\/span><span class=\"token function\">findById<\/span><span class=\"token punctuation\">(<\/span>id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u83b7\u53d6\u6240\u6709\u7528\u6237&#xff08;\u8fd4\u56de\u7528\u6237\u5217\u8868\u6d41&#xff09;<\/span><br \/>\n    <span class=\"token annotation punctuation\">&#064;GetMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/users&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">Flux<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> <span class=\"token function\">getAllUsers<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> userRepository<span class=\"token punctuation\">.<\/span><span class=\"token function\">findAll<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u6dfb\u52a0\u7528\u6237&#xff08;\u63a5\u6536JSON\u8bf7\u6c42\u4f53&#xff09;<\/span><br \/>\n    <span class=\"token annotation punctuation\">&#064;PostMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/users&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">Mono<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> <span class=\"token function\">addUser<\/span><span class=\"token punctuation\">(<\/span><span class=\"token annotation punctuation\">&#064;RequestBody<\/span> <span class=\"token class-name\">Mono<\/span><span class=\"token generics\"><span class=\"token punctuation\">&lt;<\/span><span class=\"token class-name\">User<\/span><span class=\"token punctuation\">&gt;<\/span><\/span> userMono<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> userMono<span class=\"token punctuation\">.<\/span><span class=\"token function\">flatMap<\/span><span class=\"token punctuation\">(<\/span>user <span class=\"token operator\">-&gt;<\/span> userRepository<span class=\"token punctuation\">.<\/span><span class=\"token function\">save<\/span><span class=\"token punctuation\">(<\/span>user<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<hr \/>\n<h4>\u5173\u952e\u70b9\u89e3\u91ca<\/h4>\n<li>\n<p>\u4e3a\u4ec0\u4e48\u7528 Mono \u548c Flux&#xff1f;<\/p>\n<ul>\n<li>Mono&#xff1a;\u8868\u793a\u201c\u672a\u6765\u67d0\u4e2a\u65f6\u523b\u8fd4\u56de 0 \u6216 1 \u4e2a\u7ed3\u679c\u201d&#xff08;\u6bd4\u5982\u67e5\u5355\u4e2a\u7528\u6237&#xff09;\u3002<\/li>\n<li>Flux&#xff1a;\u8868\u793a\u201c\u672a\u6765\u8fd4\u56de\u4e00\u4e32\u6570\u636e\u6d41\u201d&#xff08;\u6bd4\u5982\u67e5\u6240\u6709\u7528\u6237&#xff09;\u3002<\/li>\n<li>\u5b83\u4eec\u90fd\u662f\u975e\u963b\u585e\u7684&#xff0c;\u4e0d\u4f1a\u8ba9\u7ebf\u7a0b\u50bb\u7b49\u7ed3\u679c\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u548c\u4f20\u7edf Spring MVC \u7684\u533a\u522b&#xff1f;<\/p>\n<ul>\n<li>\u4f20\u7edf\u505a\u6cd5&#xff1a;\u6bcf\u4e2a\u8bf7\u6c42\u5360\u7528\u4e00\u4e2a\u7ebf\u7a0b&#xff0c;\u5982\u679c\u6570\u636e\u5e93\u67e5\u8be2\u6162&#xff0c;\u7ebf\u7a0b\u4f1a\u88ab\u963b\u585e\u3002<\/li>\n<li>WebFlux \u505a\u6cd5&#xff1a;\u7ebf\u7a0b\u4e0d\u4f1a\u963b\u585e&#xff0c;\u6570\u636e\u5e93\u51c6\u5907\u597d\u6570\u636e\u65f6\u81ea\u52a8\u901a\u77e5&#xff0c;\u7528\u5c11\u91cf\u7ebf\u7a0b\u5904\u7406\u66f4\u591a\u8bf7\u6c42\u3002<\/li>\n<\/ul>\n<\/li>\n<hr \/>\n<h4>\u4e3e\u4e2a\u5b9e\u9645\u573a\u666f<\/h4>\n<p>\u5047\u8bbe\u4f60\u7684\u7cfb\u7edf\u6709 1 \u4e07\u4e2a\u5e76\u53d1\u8bf7\u6c42\u67e5\u8be2\u7528\u6237&#xff1a;<\/p>\n<ul>\n<li>\u4f20\u7edf MVC&#xff1a;\u53ef\u80fd\u9700\u8981 1 \u4e07\u4e2a\u7ebf\u7a0b&#xff0c;\u7ebf\u7a0b\u9891\u7e41\u5207\u6362&#xff0c;\u8d44\u6e90\u8017\u5c3d\u3002<\/li>\n<li>WebFlux&#xff1a;\u53ef\u80fd\u53ea\u9700\u51e0\u5341\u4e2a\u7ebf\u7a0b\u8f6e\u8be2\u5904\u7406&#xff0c;\u6570\u636e\u5e93\u8fd4\u56de\u6570\u636e\u65f6\u624d\u5904\u7406&#xff0c;\u7701\u8d44\u6e90\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>\u603b\u7ed3<\/h4>\n<ul>\n<li>WebFlux \u9002\u5408&#xff1a;\u9ad8\u5e76\u53d1\u3001IO \u5bc6\u96c6\u64cd\u4f5c&#xff08;\u5982\u5927\u91cf\u6570\u636e\u5e93\/\u7f51\u7edc\u8bf7\u6c42&#xff09;\u3002<\/li>\n<li>User \u4f8b\u5b50\u6838\u5fc3&#xff1a;\u7528 Mono \u548c Flux \u8868\u793a\u5f02\u6b65\u64cd\u4f5c&#xff0c;\u63a5\u53e3\u5199\u6cd5\u7c7b\u4f3c MVC&#xff0c;\u4f46\u5e95\u5c42\u662f\u975e\u963b\u585e\u7684\u3002<\/li>\n<li>\u7b80\u5355\u7406\u89e3&#xff1a;\u628a\u540c\u6b65\u7684\u201c\u7b49\u7ed3\u679c\u201d\u53d8\u6210\u5f02\u6b65\u7684\u201c\u7ed3\u679c\u597d\u4e86\u518d\u901a\u77e5\u6211\u201d\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb710\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf4\u6b21\u3002spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[963,123,43],"topic":[],"class_list":["post-33057","post","type-post","status-publish","format-standard","hentry","category-server","tag-spring-cloud","tag-123","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/33057.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb710\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf4\u6b21\u3002spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/33057.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-26T03:25:27+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33057.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/33057.html\",\"name\":\"spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-26T03:25:27+00:00\",\"dateModified\":\"2025-04-26T03:25:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/33057.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/33057.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/33057.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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":"https:\/\/www.wsisp.com\/helps\/33057.html","og_locale":"zh_CN","og_type":"article","og_title":"spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb710\u6b21\uff0c\u70b9\u8d5e23\u6b21\uff0c\u6536\u85cf4\u6b21\u3002spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09","og_url":"https:\/\/www.wsisp.com\/helps\/33057.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-26T03:25:27+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/33057.html","url":"https:\/\/www.wsisp.com\/helps\/33057.html","name":"spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-26T03:25:27+00:00","dateModified":"2025-04-26T03:25:27+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/33057.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/33057.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/33057.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"spring ai \u4e2d\u5e38\u89c1\u4ee3\u7801\u89e3\u8bfb \u7528 webFlux \u505a\u9ad8\u5e76\u53d1\u7684\u670d\u52a1\u5668\uff08\u5165\u95e84\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=33057"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/33057\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=33057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=33057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=33057"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=33057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}