{"id":68907,"date":"2026-01-30T21:48:52","date_gmt":"2026-01-30T13:48:52","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/68907.html"},"modified":"2026-01-30T21:48:52","modified_gmt":"2026-01-30T13:48:52","slug":"spring-ai-2-0%e5%ae%9e%e6%88%98%ef%bc%9ajava%e7%a8%8b%e5%ba%8f%e5%91%98%e5%a6%82%e4%bd%95%e7%94%a810%e5%88%86%e9%92%9f%e9%9b%86%e6%88%90%e5%a4%a7%e6%a8%a1%e5%9e%8b%ef%bc%8c%e5%91%8a%e5%88%abpython","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/68907.html","title":{"rendered":"Spring AI 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56"},"content":{"rendered":"<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\n<ul>\n<li>\u7b2c\u4e00\u6b65&#xff1a;\u73af\u5883\u51c6\u5907&#xff08;3\u5206\u949f\u641e\u5b9a&#xff09;<\/li>\n<li>\u7b2c\u4e8c\u6b65&#xff1a;\u914d\u7f6e\u5927\u6a21\u578b\u5bc6\u94a5&#xff08;1\u5206\u949f&#xff09;<\/li>\n<li>\u7b2c\u4e09\u6b65&#xff1a;\u5199\u6838\u5fc3\u4ee3\u7801&#xff08;5\u5206\u949f&#xff0c;\u590d\u5236\u5c31\u8dd1&#xff09;<\/li>\n<li>\u7b2c\u56db\u6b65&#xff1a;\u542f\u52a8\u6d4b\u8bd5&#xff08;1\u5206\u949f\u89c1\u8bc1\u5947\u8ff9&#xff09;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p> \u670b\u53cb\u4eec&#xff01;\u662f\u4e0d\u662f\u603b\u88abPython\u5708\u7684AI\u6559\u7a0b\u5377\u5230&#xff1f;\u4f5c\u4e3aJava\u7a0b\u5e8f\u5458&#xff0c;\u60f3\u73a9\u5927\u6a21\u578b\u8fd8\u5f97\u5b66Python&#xff1f;No No No&#xff01;2026\u5e74\u4e86&#xff0c;Spring AI 2.0\u76f4\u63a5\u628a\u5927\u6a21\u578b\u642c\u8fdbJava\u751f\u6001&#xff0c;10\u5206\u949f\u5c31\u80fd\u8dd1\u901a&#xff0c;\u4eca\u5929\u54b1\u5c31\u624b\u628a\u624b\u6559&#xff0c;\u4ee3\u7801\u76f4\u63a5\u6284&#xff0c;\u5c0f\u767d\u4e5f\u80fd\u79d2\u4f1a&#xff5e; <\/p>\n<p>\u9996\u5148\u5f97\u8bf4&#xff0c;Spring AI 2.0\u8fd9\u6ce2\u662f\u771f\u8d34\u5fc3&#xff01;\u4e0d\u7528\u7ba1\u590d\u6742\u7684API\u8c03\u7528\u3001\u7b7e\u540d\u9a8c\u8bc1&#xff0c;\u76f4\u63a5\u7528Spring Boot\u90a3\u5957\u719f\u6089\u7684\u6ce8\u89e3&#xff0c;\u8ddf\u96c6\u6210Redis\u3001MySQL\u4e00\u6837\u7b80\u5355&#xff0c;\u54b1Javaer\u7ec8\u4e8e\u4e0d\u7528\u7fa1\u6155Python\u4e86&#xff5e;<\/p>\n<h4>\u7b2c\u4e00\u6b65&#xff1a;\u73af\u5883\u51c6\u5907&#xff08;3\u5206\u949f\u641e\u5b9a&#xff09;<\/h4>\n<p>\u54b1\u5c31\u7528\u6700\u5e38\u7528\u7684Spring Boot 3.2 &#043; Spring AI 2.0&#xff0c;Maven\u4f9d\u8d56\u76f4\u63a5\u590d\u5236\u7c98\u8d34&#xff0c;\u4e0d\u7528\u81ea\u5df1\u627e\u7248\u672c&#xff01;<\/p>\n<p><span class=\"token comment\">&lt;!&#8211; Spring Boot\u7236\u5de5\u7a0b &#8211;&gt;<\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>parent<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.springframework.boot<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>spring-boot-starter-parent<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>3.2.5<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>relativePath<\/span><span class=\"token punctuation\">\/&gt;<\/span><\/span><br \/>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>parent<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<p>&lt;<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependencies<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token comment\">&lt;!&#8211; Spring Web&#xff08;\u65b9\u4fbf\u505a\u63a5\u53e3\u6d4b\u8bd5&#xff09; &#8211;&gt;<\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n        <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.springframework.boot<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n        <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>spring-boot-starter-web<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token comment\">&lt;!&#8211; Spring AI \u6838\u5fc3\u4f9d\u8d56&#xff08;\u5927\u6a21\u578b\u6838\u5fc3&#xff09; &#8211;&gt;<\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n        <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.springframework.ai<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n        <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>spring-ai-openai-spring-boot-starter<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n        <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>2.0.0<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>version<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token comment\">&lt;!&#8211; Lombok&#xff08;\u5c11\u5199\u70b9getter\/setter&#xff09; &#8211;&gt;<\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n        <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>org.projectlombok<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>groupId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n        <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>lombok<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>artifactId<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n        <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;<\/span>optional<\/span><span class=\"token punctuation\">&gt;<\/span><\/span>true<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>optional<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n    <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependency<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><br \/>\n&lt;\/<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;\/<\/span>dependencies<\/span><span class=\"token punctuation\">&gt;<\/span><\/span><\/p>\n<h4>\u7b2c\u4e8c\u6b65&#xff1a;\u914d\u7f6e\u5927\u6a21\u578b\u5bc6\u94a5&#xff08;1\u5206\u949f&#xff09;<\/h4>\n<p>\u8ddf\u914d\u7f6e\u6570\u636e\u5e93\u8fde\u63a5\u4e00\u6837&#xff0c;\u5728application.yml\u91cc\u586bOpenAI\u7684API\u5bc6\u94a5&#xff08;\u6ca1\u6709\u7684\u8bdd\u53bb\u5b98\u7f51\u7533\u8bf7\u4e2a\u8bd5\u7528\u7684&#xff0c;\u5f88\u5feb&#xff01;&#xff09;&#xff0c;\u60f3\u6362\u56fd\u4ea7\u6a21\u578b\u6bd4\u5982\u667a\u8c31\u3001\u963f\u91cc\u901a\u4e49\u4e5f\u80fd\u76f4\u63a5\u6539&#xff0c;Spring AI 2.0\u90fd\u652f\u6301&#xff5e;<\/p>\n<p><span class=\"token key atrule\">spring<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">ai<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">openai<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">api-key<\/span><span class=\"token punctuation\">:<\/span> \u4f60\u7684API\u5bc6\u94a5  <span class=\"token comment\"># \u66ff\u6362\u6210\u81ea\u5df1\u7684\u5bc6\u94a5\u54e6<\/span><br \/>\n      <span class=\"token key atrule\">chat<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">model<\/span><span class=\"token punctuation\">:<\/span> gpt<span class=\"token punctuation\">&#8211;<\/span>4o  <span class=\"token comment\"># \u7528\u6700\u65b0\u7684gpt-4o&#xff0c;\u54cd\u5e94\u5feb\u8fd8\u652f\u6301\u591a\u6a21\u6001<\/span><\/p>\n<h4>\u7b2c\u4e09\u6b65&#xff1a;\u5199\u6838\u5fc3\u4ee3\u7801&#xff08;5\u5206\u949f&#xff0c;\u590d\u5236\u5c31\u8dd1&#xff09;<\/h4>\n<p>\u54b1\u641e\u4e2a\u7b80\u5355\u7684\u5bf9\u8bdd\u63a5\u53e3&#xff0c;\u7528&#064;RestController&#043;&#064;Autowired\u5c31\u80fd\u6ce8\u5165\u5927\u6a21\u578b\u5ba2\u6237\u7aef&#xff0c;\u6bd4\u60f3\u8c61\u4e2d\u7b80\u5355\u592a\u591a&#xff01;<\/p>\n<p><span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">lombok<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">RequiredArgsConstructor<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>ai<span class=\"token punctuation\">.<\/span>openai<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">OpenAiChatClient<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">GetMapping<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">RequestParam<\/span><\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">import<\/span> <span class=\"token import\"><span class=\"token namespace\">org<span class=\"token punctuation\">.<\/span>springframework<span class=\"token punctuation\">.<\/span>web<span class=\"token punctuation\">.<\/span>bind<span class=\"token punctuation\">.<\/span>annotation<span class=\"token punctuation\">.<\/span><\/span><span class=\"token class-name\">RestController<\/span><\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token annotation punctuation\">&#064;RestController<\/span><br \/>\n<span class=\"token annotation punctuation\">&#064;RequiredArgsConstructor<\/span>  <span class=\"token comment\">\/\/ Lombok\u81ea\u52a8\u6ce8\u5165&#xff0c;\u4e0d\u7528\u5199\u6784\u9020\u5668<\/span><br \/>\n<span class=\"token keyword\">public<\/span> <span class=\"token keyword\">class<\/span> <span class=\"token class-name\">AiChatController<\/span> <span class=\"token punctuation\">{<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u76f4\u63a5\u6ce8\u5165Spring AI\u5c01\u88c5\u597d\u7684\u5927\u6a21\u578b\u5ba2\u6237\u7aef&#xff0c;\u4e0d\u7528\u81ea\u5df1\u5199HTTP\u8bf7\u6c42&#xff01;<\/span><br \/>\n    <span class=\"token keyword\">private<\/span> <span class=\"token keyword\">final<\/span> <span class=\"token class-name\">OpenAiChatClient<\/span> openAiChatClient<span class=\"token punctuation\">;<\/span><\/p>\n<p>    <span class=\"token comment\">\/\/ \u5199\u4e2a\u63a5\u53e3&#xff1a;\u8f93\u5165\u95ee\u9898&#xff0c;\u8fd4\u56deAI\u56de\u7b54<\/span><br \/>\n    <span class=\"token annotation punctuation\">&#064;GetMapping<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;\/chat&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">public<\/span> <span class=\"token class-name\">String<\/span> <span class=\"token function\">chatWithAi<\/span><span class=\"token punctuation\">(<\/span><span class=\"token annotation punctuation\">&#064;RequestParam<\/span> <span class=\"token class-name\">String<\/span> question<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token comment\">\/\/ \u4e00\u53e5\u8bdd\u8c03\u7528\u5927\u6a21\u578b&#xff0c;\u62ff\u5230\u7ed3\u679c\u76f4\u63a5\u8fd4\u56de&#xff0c;\u8fd9\u4e5f\u592a\u4e1d\u6ed1\u4e86&#xff01;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> openAiChatClient<span class=\"token punctuation\">.<\/span><span class=\"token function\">call<\/span><span class=\"token punctuation\">(<\/span>question<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<h4>\u7b2c\u56db\u6b65&#xff1a;\u542f\u52a8\u6d4b\u8bd5&#xff08;1\u5206\u949f\u89c1\u8bc1\u5947\u8ff9&#xff09;<\/h4>\n<li>\u542f\u52a8Spring Boot\u5e94\u7528&#xff0c;\u6ca1\u5565\u62a5\u9519\u5c31\u6210&#xff1b;<\/li>\n<li>\u6253\u5f00\u6d4f\u89c8\u5668&#xff0c;\u8bbf\u95ee http:\/\/localhost:8080\/chat?question&#061;\u7528Java\u5199\u4e00\u4e2a\u5feb\u901f\u6392\u5e8f&#xff0c;\u7b49\u4e2a1-2\u79d2&#xff0c;AI\u76f4\u63a5\u8fd4\u56de\u5e26\u6ce8\u91ca\u7684Java\u4ee3\u7801&#xff0c;\u6bd4\u81ea\u5df1\u67e5\u8d44\u6599\u5feb10\u500d&#xff01;<\/li>\n<p>\u54b1Java\u7a0b\u5e8f\u5458\u73a9AI&#xff0c;\u73b0\u5728\u771f\u4e0d\u7528\u7ed5\u8fdc\u8def\u4e86&#xff5e;Spring AI 2.0\u628a\u590d\u6742\u7684\u5e95\u5c42\u903b\u8f91\u5168\u5c01\u88c5\u4e86&#xff0c;\u54b1\u4e13\u6ce8\u4e1a\u52a1\u5c31\u884c\u3002\u4e0d\u8fc7\u8bdd\u8bf4\u56de\u6765&#xff0c;\u5149\u4f1a\u96c6\u6210\u8fd8\u4e0d\u591f&#xff0c;\u60f3\u771f\u6b63\u5403\u900fAI&#xff0c;\u4ece\u5e95\u5c42\u539f\u7406\u5230\u5b9e\u6218\u9879\u76ee\u90fd\u5f97\u5b66\u3002\u76ee\u524d\u56fd\u5185\u8fd8\u662f\u5f88\u7f3aAI\u4eba\u624d\u7684&#xff0c;\u5e0c\u671b\u66f4\u591a\u4eba\u80fd\u771f\u6b63\u52a0\u5165\u5230AI\u884c\u4e1a&#xff0c;\u5171\u540c\u4fc3\u8fdb\u884c\u4e1a\u8fdb\u6b65\u3002\u60f3\u8981\u7cfb\u7edf\u5b66\u4e60AI\u77e5\u8bc6\u7684\u670b\u53cb\u53ef\u4ee5\u770b\u770b\u6211\u7684\u6559\u7a0bhttp:\/\/blog.csdn.net\/jiangjunshow&#xff0c;\u6559\u7a0b\u901a\u4fd7\u6613\u61c2&#xff0c;\u98ce\u8da3\u5e7d\u9ed8&#xff0c;\u4ece\u6df1\u5ea6\u5b66\u4e60\u57fa\u7840\u539f\u7406\u5230\u5404\u9886\u57df\u5b9e\u6218\u5e94\u7528\u90fd\u6709\u8bb2\u89e3\u3002<\/p>\n<p>\u6700\u540e\u518d\u53e8\u53e8\u4e00\u53e5&#xff1a;2026\u5e74\u7684AI\u5f00\u53d1&#xff0c;\u65e9\u5c31\u4e0d\u662f\u67d0\u4e00\u95e8\u8bed\u8a00\u7684\u4e13\u5c5e\u4e86\u3002Javaer\u7528Spring AI&#xff0c;Pythoner\u7528LangChain&#xff0c;\u6838\u5fc3\u662f\u628a\u5de5\u5177\u7528\u5bf9\u5730\u65b9\u3002\u4eca\u5929\u8fd910\u5206\u949f\u7684\u5c0f\u6848\u4f8b&#xff0c;\u53ea\u662f\u4e2a\u5f00\u59cb&#xff0c;\u540e\u7eed\u8fd8\u80fd\u96c6\u6210\u591a\u6a21\u6001&#xff08;\u6587\u5b57\u8f6c\u56fe\u7247\u3001\u8bed\u97f3&#xff09;\u3001\u672c\u5730\u5927\u6a21\u578b&#xff08;\u6bd4\u5982Llama 3&#xff09;&#xff0c;\u54b1\u8bc4\u8bba\u533a\u804a&#xff0c;\u60f3\u770b\u5565\u529f\u80fd\u6211\u4e0b\u6b21\u66f4&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u76ee\u5f55 \u7b2c\u4e00\u6b65&#xff1a;\u73af\u5883\u51c6\u5907&#xff08;3\u5206\u949f\u641e\u5b9a&#xff09;\u7b2c\u4e8c\u6b65&#xff1a;\u914d\u7f6e\u5927\u6a21\u578b\u5bc6\u94a5&#xff08;1\u5206\u949f&#xff09;\u7b2c\u4e09\u6b65&#xff1a;\u5199\u6838\u5fc3\u4ee3\u7801&#xff08;5\u5206\u949f&#xff0c;\u590d\u5236\u5c31\u8dd1&#xff09;\u7b2c\u56db\u6b65&#xff1a;\u542f\u52a8\u6d4b\u8bd5&#xff08;1\u5206\u949f\u89c1\u8bc1\u5947\u8ff9&#xff09; \u670b\u53cb\u4eec&#xff01;\u662f\u4e0d\u662f\u603b\u88abPython\u5708\u7684AI\u6559\u7a0b\u5377\u5230&#xff1f;\u4f5c\u4e3aJava\u7a0b\u5e8f\u5458&#xff0c;\u60f3\u73a9\u5927\u6a21\u578b\u8fd8\u5f97\u5b66Python&amp;#xff1f<\/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":[99,50],"topic":[],"class_list":["post-68907","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-50"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Spring AI 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56 - \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\/68907.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring AI 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u76ee\u5f55 \u7b2c\u4e00\u6b65&#xff1a;\u73af\u5883\u51c6\u5907&#xff08;3\u5206\u949f\u641e\u5b9a&#xff09;\u7b2c\u4e8c\u6b65&#xff1a;\u914d\u7f6e\u5927\u6a21\u578b\u5bc6\u94a5&#xff08;1\u5206\u949f&#xff09;\u7b2c\u4e09\u6b65&#xff1a;\u5199\u6838\u5fc3\u4ee3\u7801&#xff08;5\u5206\u949f&#xff0c;\u590d\u5236\u5c31\u8dd1&#xff09;\u7b2c\u56db\u6b65&#xff1a;\u542f\u52a8\u6d4b\u8bd5&#xff08;1\u5206\u949f\u89c1\u8bc1\u5947\u8ff9&#xff09; \u670b\u53cb\u4eec&#xff01;\u662f\u4e0d\u662f\u603b\u88abPython\u5708\u7684AI\u6559\u7a0b\u5377\u5230&#xff1f;\u4f5c\u4e3aJava\u7a0b\u5e8f\u5458&#xff0c;\u60f3\u73a9\u5927\u6a21\u578b\u8fd8\u5f97\u5b66Python&amp;#xff1f\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/68907.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-30T13:48:52+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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/68907.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/68907.html\",\"name\":\"Spring AI 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-30T13:48:52+00:00\",\"dateModified\":\"2026-01-30T13:48:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/68907.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/68907.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/68907.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring AI 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56\"}]},{\"@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 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56 - \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\/68907.html","og_locale":"zh_CN","og_type":"article","og_title":"Spring AI 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u76ee\u5f55 \u7b2c\u4e00\u6b65&#xff1a;\u73af\u5883\u51c6\u5907&#xff08;3\u5206\u949f\u641e\u5b9a&#xff09;\u7b2c\u4e8c\u6b65&#xff1a;\u914d\u7f6e\u5927\u6a21\u578b\u5bc6\u94a5&#xff08;1\u5206\u949f&#xff09;\u7b2c\u4e09\u6b65&#xff1a;\u5199\u6838\u5fc3\u4ee3\u7801&#xff08;5\u5206\u949f&#xff0c;\u590d\u5236\u5c31\u8dd1&#xff09;\u7b2c\u56db\u6b65&#xff1a;\u542f\u52a8\u6d4b\u8bd5&#xff08;1\u5206\u949f\u89c1\u8bc1\u5947\u8ff9&#xff09; \u670b\u53cb\u4eec&#xff01;\u662f\u4e0d\u662f\u603b\u88abPython\u5708\u7684AI\u6559\u7a0b\u5377\u5230&#xff1f;\u4f5c\u4e3aJava\u7a0b\u5e8f\u5458&#xff0c;\u60f3\u73a9\u5927\u6a21\u578b\u8fd8\u5f97\u5b66Python&amp;#xff1f","og_url":"https:\/\/www.wsisp.com\/helps\/68907.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-30T13:48:52+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/68907.html","url":"https:\/\/www.wsisp.com\/helps\/68907.html","name":"Spring AI 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-30T13:48:52+00:00","dateModified":"2026-01-30T13:48:52+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/68907.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/68907.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/68907.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Spring AI 2.0\u5b9e\u6218\uff1aJava\u7a0b\u5e8f\u5458\u5982\u4f55\u752810\u5206\u949f\u96c6\u6210\u5927\u6a21\u578b\uff0c\u544a\u522bPython\u4f9d\u8d56"}]},{"@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\/68907","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=68907"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/68907\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=68907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=68907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=68907"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=68907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}