{"id":202,"date":"2026-09-06T00:41:13","date_gmt":"2026-09-05T16:41:13","guid":{"rendered":"https:\/\/www.ziliaochi.cn\/index.php\/2026\/09\/06\/spring-boot-4-spring-ai-upgrade\/"},"modified":"2026-09-06T00:41:13","modified_gmt":"2026-09-05T16:41:13","slug":"spring-boot-4-spring-ai-upgrade","status":"publish","type":"post","link":"https:\/\/www.ziliaochi.cn\/index.php\/2026\/09\/06\/spring-boot-4-spring-ai-upgrade\/","title":{"rendered":"Spring Boot 4 \u4e0e Spring AI 2\uff1a\u4e09\u5c42\u540c\u65f6\u6362\u4ee3\u65f6\u7684\u5347\u7ea7\u987a\u5e8f\u4e0e\u907f\u5751\u6e05\u5355"},"content":{"rendered":"<div style=\"font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"PingFang SC\",\"Hiragino Sans GB\",\"Microsoft YaHei\",sans-serif;font-size:16.5px;line-height:1.9;color:#35435c;letter-spacing:.2px\">\n<div style=\"background:linear-gradient(135deg,#f5f9ff,#eef5ff);border:1px solid #dce8f8;border-left:4px solid #c96a1f;border-radius:12px;padding:16px 20px;margin:0 0 24px;font-size:14.5px;color:#3d5570;line-height:2\"><span style=\"display:inline-block;background:#c96a1f;color:#fff;font-size:12.5px;font-weight:700;padding:3px 10px;border-radius:6px;margin-right:12px;letter-spacing:1px;vertical-align:1px\">\u5173\u952e\u8bcd<\/span>Spring Boot 4\u3001Spring AI 2\u3001JDK 25\u3001\u865a\u62df\u7ebf\u7a0b\u3001Java \u5347\u7ea7\u3001\u540e\u7aef\u67b6\u6784<\/div>\n<div style=\"background:#fafbfd;border:1px solid #e8edf5;border-radius:12px;padding:18px 22px;margin:0 0 30px\">\n<div style=\"font-size:13.5px;font-weight:700;color:#8a99ae;letter-spacing:2px;margin-bottom:12px\">\u76ee\u5f55<\/div>\n<ol style=\"margin:0;padding-left:20px\">\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-1\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e00\u3001\u7248\u672c\u5750\u6807<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-2\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e8c\u3001Spring Boot 4\uff1a\u6539\u52a8\u96c6\u4e2d\u5728&#8221;\u57fa\u7ebf&#8221;\uff0c\u4e0d\u5728\u5199\u6cd5<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-3\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e09\u3001Spring AI 2\uff1a\u4ece&#8221;\u80fd\u8c03\u6a21\u578b&#8221;\u5230&#8221;\u80fd\u8fdb\u751f\u4ea7&#8221;<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-4\" style=\"color:#42546e;text-decoration:none;border:none\">\u56db\u3001\u63a8\u8350\u5347\u7ea7\u987a\u5e8f<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-5\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e94\u3001\u4ec0\u4e48\u60c5\u51b5\u4e0b\u5e94\u8be5\u6682\u7f13<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-6\" style=\"color:#42546e;text-decoration:none;border:none\">\u516d\u3001\u5c0f\u7ed3<\/a><\/li>\n<\/ol>\n<\/div>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\"><span style=\"font-size:17px;color:#1e2f47\">2026 \u5e74\u7684 Java \u540e\u7aef\u6b63\u5904\u5728\u4e00\u4e2a\u5c11\u89c1\u7684&#8221;\u4e09\u5c42\u540c\u65f6\u6362\u4ee3&#8221;\u7684\u7a97\u53e3\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">JDK 25 LTS \u843d\u5730\u3001Spring Boot 4 \u4e3b\u7ebf\u63a8\u8fdb\u3001Spring AI 2 \u8fdb\u5165 GA<\/strong>\u3002\u4e09\u5c42\u5404\u81ea\u90fd\u5728\u52a8\uff0c\u53e0\u52a0\u8d77\u6765\u5c31\u662f\u4e00\u6b21\u9700\u8981\u8ba4\u771f\u89c4\u5212\u7684\u6280\u672f\u6808\u8fc1\u79fb\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u672c\u6587\u628a\u8fd9\u4e09\u5c42\u7684\u73b0\u72b6\u3001\u76f8\u4e92\u5173\u7cfb\u548c\u53ef\u6267\u884c\u7684\u5347\u7ea7\u987a\u5e8f\u8bb2\u6e05\u695a\uff0c\u5e76\u7ed9\u51fa\u4e00\u4efd\u907f\u5751\u6e05\u5355\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #c96a1f;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-1\">\u4e00\u3001\u7248\u672c\u5750\u6807<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u622a\u81f3 2026 \u5e74 9 \u6708\uff0c\u4ece Maven Central \u5143\u6570\u636e\u6838\u5bf9\u5230\u7684\u6b63\u5f0f\u7248\u672c\u5982\u4e0b\uff08\u91cc\u7a0b\u7891\u7248\u672c\u672a\u8ba1\u5165\uff09\uff1a<\/p>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">Spring Boot<\/strong>\uff1a<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">4.1.1<\/code>\uff084.2.0 \u7cfb\u5217\u5df2\u6709\u91cc\u7a0b\u7891\u7248\u672c\u5728\u63a8\u8fdb\uff09\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">Spring Framework<\/strong>\uff1a<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">7.0.9<\/code>\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">Spring AI<\/strong>\uff1a<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">2.0.1<\/code>\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">JDK<\/strong>\uff1a\u6700\u65b0 LTS \u4e3a <strong style=\"color:#0f1c2e;font-weight:600\">25<\/strong>\uff0c\u6700\u65b0\u7279\u6027\u7248\u672c\u4e3a 26\u3002<\/li>\n<\/ul>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u7248\u672c\u4fe1\u606f\u5efa\u8bae\u4ee5 <a href=\"https:\/\/central.sonatype.com\/\" target=\"_blank\" rel=\"noopener\" style=\"color:#c96a1f;text-decoration:none;border-bottom:1px solid #c96a1f66;transition:opacity .15s\">Maven Central<\/a> \u4e0a\u7684 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">maven-metadata.xml<\/code> \u4e3a\u51c6\u2014\u2014\u6ce8\u610f\u522b\u628a\u91cc\u7a0b\u7891\u7248\u672c\uff08<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-M1<\/code>\u3001<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">-RC1<\/code>\uff09\u8bef\u5f53\u6210\u6b63\u5f0f\u7248\uff0c\u68c0\u7d22\u5de5\u5177\u8fd4\u56de\u7684&#8221;\u6700\u65b0\u7248&#8221;\u7ecf\u5e38\u662f\u91cc\u7a0b\u7891\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #c96a1f;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-2\">\u4e8c\u3001Spring Boot 4\uff1a\u6539\u52a8\u96c6\u4e2d\u5728&#8221;\u57fa\u7ebf&#8221;\uff0c\u4e0d\u5728\u5199\u6cd5<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u597d\u6d88\u606f\u662f\uff0c<strong style=\"color:#0f1c2e;font-weight:600\">Spring Boot 4 \u5bf9\u65e5\u5e38\u4e1a\u52a1\u4ee3\u7801\u7684\u7834\u574f\u6027\u4e0d\u5927<\/strong>\u3002\u6ce8\u89e3\u3001\u914d\u7f6e\u65b9\u5f0f\u3001\u81ea\u52a8\u88c5\u914d\u7684\u5fc3\u667a\u6a21\u578b\u90fd\u6ca1\u6709\u7ffb\u5929\u8986\u5730\u7684\u53d8\u5316\u3002\u771f\u6b63\u9700\u8981\u63d0\u524d\u786e\u8ba4\u7684\u662f\u4e0b\u9762\u51e0\u4ef6\u4e8b\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #c96a1f40\">1. JDK \u4e0e Jakarta EE \u57fa\u7ebf<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">Spring Boot 4 \u5efa\u7acb\u5728 Spring Framework 7 \u4e4b\u4e0a\uff0c\u5bf9 <strong style=\"color:#0f1c2e;font-weight:600\">\u6700\u4f4e JDK \u7248\u672c\u548c Jakarta EE \u7248\u672c\u7684\u8981\u6c42\u90fd\u968f\u5927\u7248\u672c\u63d0\u5347<\/strong>\u3002\u8fd9\u662f\u5347\u7ea7\u524d\u5fc5\u987b\u7b2c\u4e00\u9879\u6838\u5b9e\u7684\u786c\u95e8\u69db\u2014\u2014\u5982\u679c\u751f\u4ea7\u73af\u5883\u8fd8\u505c\u5728\u5f88\u65e7\u7684 JDK \u4e0a\uff0c\u90a3\u4e48\u771f\u6b63\u7684\u6210\u672c\u4e0d\u5728 Spring\uff0c\u800c\u5728\u5148\u628a\u8fd0\u884c\u65f6\u62c9\u4e0a\u6765\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5efa\u8bae\u505a\u6cd5\u662f\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u5148\u5355\u72ec\u628a JDK \u5347\u5230 LTS \u7248\u672c\u5e76\u7a33\u5b9a\u8dd1\u4e00\u6bb5\u65f6\u95f4<\/strong>\uff0c\u518d\u52a8 Spring\u3002\u4e24\u4e2a\u53d8\u91cf\u4e00\u8d77\u53d8\uff0c\u51fa\u95ee\u9898\u65f6\u7684\u5f52\u56e0\u4f1a\u975e\u5e38\u75db\u82e6\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #c96a1f40\">2. \u88ab\u79fb\u9664\u7684\u5e9f\u5f03 API<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5927\u7248\u672c\u662f\u6e05\u7406\u5386\u53f2\u5305\u88b1\u7684\u7a97\u53e3\u3002\u5347\u7ea7\u65f6\u6700\u5148\u62a5\u9519\u7684\u901a\u5e38\u662f\u8fd9\u4e9b\uff1a<\/p>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u65e9\u5df2\u6807\u8bb0 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">@Deprecated<\/code> \u4e14\u5728\u5927\u7248\u672c\u88ab\u79fb\u9664\u7684\u7c7b\u4e0e\u65b9\u6cd5\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u81ea\u52a8\u88c5\u914d\u914d\u7f6e\u65b9\u5f0f\u7684\u8c03\u6574\uff08<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">spring.factories<\/code> \u76f8\u5173\u7684\u5386\u53f2\u5199\u6cd5\uff09\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u7b2c\u4e09\u65b9 starter \u5c1a\u672a\u9002\u914d\u65b0\u7248\u672c\u2014\u2014<strong style=\"color:#0f1c2e;font-weight:600\">\u8fd9\u662f\u6700\u5e38\u89c1\u7684\u5361\u70b9<\/strong>\uff0c\u5f80\u5f80\u662f\u67d0\u4e2a\u4e0d\u8d77\u773c\u7684 starter \u62d6\u4f4f\u6574\u6761\u5347\u7ea7\u94fe\u8def\u3002<\/li>\n<\/ul>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u6392\u67e5\u5efa\u8bae\uff1a\u5148\u628a <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">dependency-management<\/code> \u91cc\u7684\u7248\u672c\u7edf\u4e00\u4ea4\u7ed9 Spring Boot \u7684 BOM \u7ba1\u7406\uff0c\u522b\u624b\u5199\u7248\u672c\u53f7\uff0c\u80fd\u907f\u5f00\u5927\u534a\u4f9d\u8d56\u51b2\u7a81\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #c96a1f40\">3. \u4e0e\u865a\u62df\u7ebf\u7a0b\u7684\u5173\u7cfb<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">JDK 25 \u7684\u865a\u62df\u7ebf\u7a0b\u5df2\u7ecf\u662f\u6210\u719f\u80fd\u529b\uff0cSpring Boot 4 \u5bf9\u5b83\u7684\u652f\u6301\u8def\u5f84\u6bd4\u65e9\u671f\u6e05\u6670\u5f97\u591a\u3002\u4f46\u6709\u4e2a\u5e38\u89c1\u8bef\u89e3\u8981\u6f84\u6e05\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u5f00\u4e86\u865a\u62df\u7ebf\u7a0b\u4e0d\u7b49\u4e8e\u541e\u5410\u91cf\u81ea\u52a8\u7ffb\u500d<\/strong>\u3002<\/p>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\"># \u542f\u7528\u865a\u62df\u7ebf\u7a0b\u5904\u7406\u8bf7\u6c42\nspring.threads.virtual.enabled=true\n<\/code><\/pre>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u865a\u62df\u7ebf\u7a0b\u89e3\u51b3\u7684\u662f&#8221;<strong style=\"color:#0f1c2e;font-weight:600\">\u7ebf\u7a0b\u6570\u91cf\u4e0d\u518d\u662f\u5e76\u53d1\u4e0a\u9650<\/strong>&#8220;\uff0c\u5b83\u8ba9\u4f60\u53ef\u4ee5\u7528\u540c\u6b65\u7684\u5199\u6cd5\u5904\u7406\u5927\u91cf\u5e76\u53d1\u8fde\u63a5\u3002\u4f46\u5982\u679c\u4e0b\u6e38\u662f\u6570\u636e\u5e93\u8fde\u63a5\u6c60\u2014\u2014\u6c60\u5927\u5c0f\u4f9d\u7136\u662f\u771f\u7684\u74f6\u9888\uff0c\u90a3\u4e48\u5e76\u53d1\u538b\u5230\u6c60\u4e0a\u53ea\u4f1a\u628a\u7b49\u5f85\u65f6\u95f4\u4ece\u7ebf\u7a0b\u6c60\u642c\u5230\u4e86\u8fde\u63a5\u6c60\u3002<strong style=\"color:#0f1c2e;font-weight:600\">\u7528\u4e4b\u524d\u5148\u60f3\u6e05\u695a\u74f6\u9888\u5728\u54ea\u4e00\u5c42\u3002<\/strong><\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #c96a1f;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-3\">\u4e09\u3001Spring AI 2\uff1a\u4ece&#8221;\u80fd\u8c03\u6a21\u578b&#8221;\u5230&#8221;\u80fd\u8fdb\u751f\u4ea7&#8221;<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">Spring AI 2.0.1 \u662f\u6b63\u5f0f GA \u7248\u672c\uff0c\u5b9a\u4f4d\u662f\u628a AI \u80fd\u529b\u6309 Spring \u7684\u4e60\u60ef\u5c01\u88c5\u6210\u53ef\u6ce8\u5165\u3001\u53ef\u914d\u7f6e\u3001\u53ef\u66ff\u6362\u7684\u7ec4\u4ef6\u3002<\/p>\n<figure style=\"margin:30px 0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"900\" src=\"https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/spring-boot-4-spring-ai-upgrade-fig.png\" alt=\"\u63a8\u8350\u5347\u7ea7\u987a\u5e8f\" class=\"wp-image-201\" style=\"max-width:100%;height:auto;border-radius:12px;border:1px solid #e6ecf4;box-shadow:0 8px 24px rgba(15,30,60,.07)\" srcset=\"https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/spring-boot-4-spring-ai-upgrade-fig.png 1200w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/spring-boot-4-spring-ai-upgrade-fig-300x225.png 300w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/spring-boot-4-spring-ai-upgrade-fig-1024x768.png 1024w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/spring-boot-4-spring-ai-upgrade-fig-768x576.png 768w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/spring-boot-4-spring-ai-upgrade-fig-800x600.png 800w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption style=\"margin-top:12px;font-size:13.5px;color:#7b8aa0;text-align:center;line-height:1.75\">Java \u6280\u672f\u6808\u5347\u7ea7\u987a\u5e8f\uff1aJDK \u2192 Spring Boot \u2192 \u865a\u62df\u7ebf\u7a0b \u2192 Spring AI<\/figcaption><\/figure>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #c96a1f40\">1. \u5173\u952e\u62bd\u8c61<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5b83\u63d0\u4f9b\u7684\u6838\u5fc3\u4e0d\u662f&#8221;\u8c03\u4e00\u6b21\u5927\u6a21\u578b&#8221;\uff0c\u800c\u662f\u51e0\u5c42\u53ef\u66ff\u6362\u7684\u62bd\u8c61\uff1a<\/p>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">ChatClient \/ \u6a21\u578b\u9002\u914d\u5c42<\/strong>\uff1a\u5207\u6362\u6a21\u578b\u4f9b\u5e94\u5546\u65f6\u4e1a\u52a1\u4ee3\u7801\u57fa\u672c\u4e0d\u52a8\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u7ed3\u6784\u5316\u8f93\u51fa<\/strong>\uff1a\u628a\u6a21\u578b\u8fd4\u56de\u76f4\u63a5\u6620\u5c04\u6210 Java \u5bf9\u8c61\uff0c\u7701\u6389\u8106\u5f31\u7684\u6b63\u5219\u89e3\u6790\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5411\u91cf\u5b58\u50a8\u62bd\u8c61<\/strong>\uff1aRAG \u573a\u666f\u4e0b\u6362\u5411\u91cf\u5e93\u4e0d\u6539\u4e1a\u52a1\u4ee3\u7801\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5de5\u5177\u8c03\u7528\uff08Function Calling\uff09<\/strong>\uff1a\u8ba9\u6a21\u578b\u89e6\u53d1\u4e1a\u52a1\u65b9\u6cd5\uff0c\u628a AI \u63a5\u8fdb\u771f\u5b9e\u7cfb\u7edf\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u53ef\u89c2\u6d4b\u6027\u8854\u63a5<\/strong>\uff1a\u8c03\u7528\u94fe\u8def\u3001token \u6d88\u8017\u80fd\u8fdb\u73b0\u6709\u7684\u76d1\u63a7\u4f53\u7cfb\u3002<\/li>\n<\/ul>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\">\/\/ \u7ed3\u6784\u5316\u8f93\u51fa\uff1a\u76f4\u63a5\u62ff Java \u5bf9\u8c61\uff0c\u4e0d\u7528\u89e3\u6790\u5b57\u7b26\u4e32\nrecord ProductReview(String sentiment, List&lt;String&gt; aspects) {}\n\nProductReview review = chatClient.prompt()\n    .user(\"\u5206\u6790\u8fd9\u6761\u8bc4\u8bba\uff1a\" + text)\n    .call()\n    .entity(ProductReview.class);\n<\/code><\/pre>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #c96a1f40\">2. \u751f\u4ea7\u843d\u5730\u5fc5\u987b\u81ea\u5df1\u8865\u7684\u4e09\u4ef6\u4e8b<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u6846\u67b6\u89e3\u51b3\u7684\u662f&#8221;\u63a5\u5f97\u4e0a&#8221;\uff0c\u4e0b\u9762\u8fd9\u4e9b<strong style=\"color:#0f1c2e;font-weight:600\">\u6846\u67b6\u4e0d\u66ff\u4f60\u505a<\/strong>\uff1a<\/p>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u8d85\u65f6\u4e0e\u964d\u7ea7<\/strong>\uff1a\u6a21\u578b\u8c03\u7528\u662f\u6162 IO\uff0c\u5fc5\u987b\u6709\u8d85\u65f6\u3001\u91cd\u8bd5\u4e0a\u9650\u548c\u515c\u5e95\u6587\u6848\uff0c\u5426\u5219\u4e00\u6b21\u4e0a\u6e38\u6296\u52a8\u4f1a\u62d6\u57ae\u6574\u6761\u94fe\u8def\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u6210\u672c\u63a7\u5236<\/strong>\uff1atoken \u6d88\u8017\u8981\u80fd\u6309\u4e1a\u52a1\u7ef4\u5ea6\u5f52\u56e0\uff0c\u5426\u5219\u6708\u5e95\u8d26\u5355\u4f1a\u662f\u9ed1\u76d2\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u8f93\u51fa\u6821\u9a8c<\/strong>\uff1a\u7ed3\u6784\u5316\u8f93\u51fa\u4e0d\u7b49\u4e8e\u6b63\u786e\u8f93\u51fa\uff0c\u5173\u952e\u4e1a\u52a1\u4ecd\u8981\u5728\u843d\u5e93\u524d\u505a\u4e1a\u52a1\u89c4\u5219\u6821\u9a8c\u3002<\/li>\n<\/ul>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #c96a1f;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-4\">\u56db\u3001\u63a8\u8350\u5347\u7ea7\u987a\u5e8f<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u4e09\u5c42\u540c\u65f6\u6362\u4ee3\u65f6\uff0c\u987a\u5e8f\u6bd4\u901f\u5ea6\u91cd\u8981\u3002\u5efa\u8bae\u6309\u4e0b\u9762\u7684\u6b65\u9aa4\u63a8\u8fdb\uff0c\u6bcf\u4e00\u6b65\u90fd\u53ef\u72ec\u7acb\u56de\u9000\uff1a<\/p>\n<ol style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">JDK \u5148\u5347\u5230 LTS 25<\/strong>\uff0c\u5e94\u7528\u4e0e\u4e2d\u95f4\u4ef6\u90fd\u9a8c\u8bc1\u901a\u8fc7\uff0c\u7a33\u5b9a\u89c2\u5bdf\u4e00\u6bb5\u65f6\u95f4\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">Spring Framework \/ Boot \u5347\u5230 4.x<\/strong>\uff0c\u5148\u5347\u4f9d\u8d56\u5c11\u7684\u670d\u52a1\uff0c\u518d\u63a8\u6838\u5fc3\u670d\u52a1\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u865a\u62df\u7ebf\u7a0b\u5355\u72ec\u7070\u5ea6<\/strong>\uff0c\u53ea\u5728\u5bf9 IO \u5bc6\u96c6\u4e14\u4e0b\u6e38\u6709\u4f59\u91cf\u7684\u63a5\u53e3\u4e0a\u5f00\uff0c\u89c2\u5bdf\u7ebf\u7a0b\u6c60\u4e0e\u8fde\u63a5\u6c60\u6307\u6807\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">Spring AI \u6700\u540e\u63a5<\/strong>\uff0c\u4e14\u5148\u7528\u5728\u975e\u5173\u952e\u8def\u5f84\uff08\u5982\u5185\u90e8\u5de5\u5177\u3001\u8fd0\u8425\u540e\u53f0\uff09\uff0c\u8dd1\u987a\u4e86\u518d\u8fdb\u4e3b\u6d41\u7a0b\u3002<\/li>\n<\/ol>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #c96a1f;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-5\">\u4e94\u3001\u4ec0\u4e48\u60c5\u51b5\u4e0b\u5e94\u8be5\u6682\u7f13<\/h2>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u6838\u5fc3\u670d\u52a1\u4f9d\u8d56\u7684\u7b2c\u4e09\u65b9 starter \u8fd8\u6ca1\u9002\u914d<\/strong>\uff1a\u81ea\u7814 fork \u4e00\u4e2a\u7684\u957f\u671f\u6210\u672c\u8fdc\u9ad8\u4e8e\u7b49\u5f85\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5904\u4e8e\u5927\u4fc3\/\u53d1\u5e03\u51bb\u7ed3\u671f<\/strong>\uff1a\u57fa\u7ebf\u53d8\u66f4\u7684\u98ce\u9669\u4e0d\u503c\u5f97\u5728\u51bb\u7ed3\u671f\u627f\u62c5\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u7f3a\u5c11\u56de\u5f52\u6d4b\u8bd5<\/strong>\uff1a\u5927\u7248\u672c\u5347\u7ea7\u6ca1\u6709\u6d4b\u8bd5\u515c\u5e95\uff0c\u7b49\u4e8e\u95ed\u773c\u8fc7\u9a6c\u8def\u3002<\/li>\n<\/ul>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #c96a1f;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-6\">\u516d\u3001\u5c0f\u7ed3<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8fd9\u4e00\u8f6e\u6362\u4ee3\u7684\u672c\u8d28\uff0c\u662f Java \u540e\u7aef\u4ece&#8221;\u7ebf\u7a0b\u6c60\u65f6\u4ee3&#8221;\u8d70\u5411&#8221;<strong style=\"color:#0f1c2e;font-weight:600\">\u865a\u62df\u7ebf\u7a0b + AI \u80fd\u529b\u5185\u5efa<\/strong>&#8220;\u3002Spring Boot 4 \u672c\u8eab\u7684\u5199\u6cd5\u53d8\u5316\u4e0d\u5927\uff0c\u771f\u6b63\u7684\u6210\u672c\u5728<strong style=\"color:#0f1c2e;font-weight:600\">\u57fa\u7ebf\u5347\u7ea7\u548c\u4f9d\u8d56\u751f\u6001\u9002\u914d<\/strong>\uff1bSpring AI 2 \u5219\u628a AI \u4ece&#8221;\u5916\u90e8\u670d\u52a1&#8221;\u53d8\u6210\u4e86&#8221;\u53ef\u6ce8\u5165\u7ec4\u4ef6&#8221;\uff0c\u4f46\u5de5\u7a0b\u4e0a\u7684\u8d85\u65f6\u3001\u6210\u672c\u3001\u6821\u9a8c\u4e09\u4ef6\u4e8b\u4ecd\u9700\u81ea\u5df1\u515c\u5e95\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5148\u5347\u8fd0\u884c\u65f6\u3001\u518d\u5347\u6846\u67b6\u3001\u6700\u540e\u63a5\u65b0\u80fd\u529b\u2014\u2014\u8fd9\u4e2a\u987a\u5e8f\u80fd\u907f\u5f00\u7edd\u5927\u591a\u6570\u5751\u3002<\/p>\n<div style=\"margin:42px 0 0;padding:22px 0 0;border-top:1px solid #eaeef4\">\n<div style=\"font-size:13px;color:#93a1b5;letter-spacing:1px;margin-bottom:12px\">\u6807\u7b7e<\/div>\n<p><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#Spring Boot<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#Java<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#Spring AI<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u540e\u7aef<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>2026 \u5e74\u7684 Java \u540e\u7aef\u6b63\u5904\u5728\u4e00\u4e2a\u4e09\u5c42\u540c\u65f6\u6362\u4ee3\u7684\u7a97\u53e3\uff1aJDK 25 LTS \u843d\u5730\u3001Spring Boot 4 \u4e3b\u7ebf\u63a8\u8fdb\u3001Spring AI 2 \u8fdb\u5165 GA\u3002\u672c\u6587\u628a\u4e09\u5c42\u7684\u73b0\u72b6\u3001\u76f8\u4e92\u5173\u7cfb\u548c\u53ef\u6267\u884c\u7684\u5347\u7ea7\u987a\u5e8f\u8bb2\u6e05\u695a\uff0c\u5e76\u7ed9\u51fa\u4e00\u4efd\u907f\u5751\u6e05\u5355\u4e0e\u5e94\u8be5\u6682\u7f13\u7684\u5224\u65ad\u6807\u51c6\u3002<\/p>\n","protected":false},"author":1,"featured_media":200,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,1],"tags":[32,90,89,91],"class_list":["post-202","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backend","category-technical","tag-java","tag-spring-ai","tag-spring-boot","tag-91"],"_links":{"self":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts\/202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/comments?post=202"}],"version-history":[{"count":0,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts\/202\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/media\/200"}],"wp:attachment":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/media?parent=202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/categories?post=202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/tags?post=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}