{"id":98799,"date":"2026-09-01T12:57:06","date_gmt":"2026-09-01T04:57:06","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/98799.html"},"modified":"2026-09-01T12:57:06","modified_gmt":"2026-09-01T04:57:06","slug":"spring-ai-%e5%85%a5%e9%97%a8%e6%8c%87%e5%8d%97%ef%bc%9a%e4%bb%8e%e9%9b%b6%e6%9e%84%e5%bb%ba%e6%99%ba%e8%83%bd%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/98799.html","title":{"rendered":"Spring AI \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528"},"content":{"rendered":"<h3>1. \u5f15\u8a00<\/h3>\n<p>\u968f\u7740\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u7684\u5feb\u901f\u53d1\u5c55&#xff0c;\u8d8a\u6765\u8d8a\u591a\u7684\u5f00\u53d1\u8005\u5e0c\u671b\u5c06 AI \u80fd\u529b\u96c6\u6210\u5230\u81ea\u5df1\u7684\u5e94\u7528\u4e2d\u3002Spring AI \u662f Spring \u751f\u6001\u4e2d\u9762\u5411 AI \u5e94\u7528\u5f00\u53d1\u7684\u5b98\u65b9\u9879\u76ee&#xff0c;\u5b83\u63d0\u4f9b\u4e86\u4e00\u5957\u7edf\u4e00\u7684\u62bd\u8c61\u5c42&#xff0c;\u8ba9\u5f00\u53d1\u8005\u53ef\u4ee5\u7528\u719f\u6089\u7684 Spring \u7f16\u7a0b\u6a21\u578b\u5feb\u901f\u63a5\u5165\u5404\u7c7b\u5927\u6a21\u578b\u670d\u52a1\u3002<\/p>\n<p>\u672c\u6587\u5c06\u4ece\u96f6\u5f00\u59cb&#xff0c;\u4ecb\u7ecd Spring AI \u7684\u6838\u5fc3\u6982\u5ff5\u3001\u73af\u5883\u642d\u5efa\u3001\u57fa\u7840\u7528\u6cd5\u4ee5\u53ca\u5b9e\u9645\u5e94\u7528\u573a\u666f&#xff0c;\u5e2e\u52a9\u8bfb\u8005\u5feb\u901f\u4e0a\u624b\u3002<\/p>\n<h3>2. \u4ec0\u4e48\u662f Spring AI<\/h3>\n<p>Spring AI \u662f Spring \u5b98\u65b9\u63a8\u51fa\u7684 AI \u5e94\u7528\u5f00\u53d1\u6846\u67b6&#xff0c;\u65e8\u5728\u4e3a Java \u5f00\u53d1\u8005\u63d0\u4f9b\u4e00\u5957\u7b80\u6d01\u3001\u7edf\u4e00\u7684\u63a5\u53e3&#xff0c;\u7528\u4e8e\u5bf9\u63a5 OpenAI\u3001Azure OpenAI\u3001Hugging Face\u3001Ollama \u7b49\u4e3b\u6d41\u5927\u6a21\u578b\u670d\u52a1\u3002<\/p>\n<p>\u5b83\u7684\u6838\u5fc3\u8bbe\u8ba1\u7406\u5ff5\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\u7edf\u4e00\u62bd\u8c61&#xff1a;\u5c4f\u853d\u4e0d\u540c\u6a21\u578b\u670d\u52a1\u5546\u7684 API \u5dee\u5f02&#xff0c;\u63d0\u4f9b\u4e00\u81f4\u7684\u8c03\u7528\u65b9\u5f0f\u3002<\/li>\n<li>Spring \u539f\u751f\u96c6\u6210&#xff1a;\u4e0e Spring Boot\u3001Spring Cloud \u65e0\u7f1d\u8854\u63a5&#xff0c;\u652f\u6301\u81ea\u52a8\u914d\u7f6e\u548c\u4f9d\u8d56\u6ce8\u5165\u3002<\/li>\n<li>\u53ef\u6269\u5c55\u6027&#xff1a;\u652f\u6301\u81ea\u5b9a\u4e49\u6a21\u578b\u63a5\u5165\u3001\u63d0\u793a\u8bcd\u6a21\u677f\u3001\u8f93\u51fa\u89e3\u6790\u7b49\u9ad8\u7ea7\u529f\u80fd\u3002<\/li>\n<\/ul>\n<h3>3. \u73af\u5883\u51c6\u5907<\/h3>\n<p>\u5728\u5f00\u59cb\u4e4b\u524d&#xff0c;\u9700\u8981\u51c6\u5907\u4ee5\u4e0b\u73af\u5883&#xff1a;<\/p>\n<ul>\n<li>JDK 17 \u6216\u66f4\u9ad8\u7248\u672c<\/li>\n<li>Maven 3.6&#043; \u6216 Gradle 7.5&#043;<\/li>\n<li>\u4e00\u4e2a\u53ef\u7528\u7684\u6a21\u578b\u670d\u52a1 API Key&#xff08;\u5982 OpenAI\u3001\u901a\u4e49\u5343\u95ee\u7b49&#xff09;<\/li>\n<\/ul>\n<p>\u63a8\u8350\u4f7f\u7528 Spring Initializr \u521b\u5efa\u9879\u76ee&#xff0c;\u5e76\u6dfb\u52a0 Spring AI \u76f8\u5173\u4f9d\u8d56\u3002<\/p>\n<h3>4. \u5feb\u901f\u5f00\u59cb<\/h3>\n<p>\u4e0b\u9762\u901a\u8fc7\u4e00\u4e2a\u7b80\u5355\u7684\u793a\u4f8b&#xff0c;\u6f14\u793a\u5982\u4f55\u4f7f\u7528 Spring AI \u8c03\u7528\u5927\u6a21\u578b\u5b8c\u6210\u6587\u672c\u751f\u6210\u4efb\u52a1\u3002<\/p>\n<h4>4.1 \u6dfb\u52a0\u4f9d\u8d56<\/h4>\n<p>&lt;dependency&gt;<br \/>\n    &lt;groupId&gt;org.springframework.ai&lt;\/groupId&gt;<br \/>\n    &lt;artifactId&gt;spring-ai-openai-spring-boot-starter&lt;\/artifactId&gt;<br \/>\n    &lt;version&gt;1.0.0-M6&lt;\/version&gt;<br \/>\n&lt;\/dependency&gt;<\/p>\n<h4>4.2 \u914d\u7f6e API Key<\/h4>\n<p>\u5728 application.yml \u4e2d\u914d\u7f6e\u6a21\u578b\u670d\u52a1\u7684 API Key&#xff1a;<\/p>\n<p>spring:<br \/>\n  ai:<br \/>\n    openai:<br \/>\n      api-key: ${OPENAI_API_KEY}<br \/>\n      chat:<br \/>\n        options:<br \/>\n          model: gpt-4o-mini<\/p>\n<h4>4.3 \u7f16\u5199\u8c03\u7528\u4ee3\u7801<\/h4>\n<p>import org.springframework.ai.chat.ChatClient;<br \/>\nimport org.springframework.stereotype.Service;<\/p>\n<p>&#064;Service<br \/>\npublic class AIService {<\/p>\n<p>    private final ChatClient chatClient;<\/p>\n<p>    public AIService(ChatClient chatClient) {<br \/>\n        this.chatClient &#061; chatClient;<br \/>\n    }<\/p>\n<p>    public String generate(String prompt) {<br \/>\n        return chatClient.call(prompt);<br \/>\n    }<br \/>\n}<\/p>\n<h3>5. \u6838\u5fc3\u529f\u80fd\u8be6\u89e3<\/h3>\n<p>Spring AI \u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u6a21\u5757&#xff0c;\u4e0b\u9762\u4ecb\u7ecd\u51e0\u4e2a\u5e38\u7528\u7684\u6838\u5fc3\u80fd\u529b\u3002<\/p>\n<h4>5.1 \u63d0\u793a\u8bcd\u6a21\u677f<\/h4>\n<p>Spring AI \u652f\u6301\u57fa\u4e8e\u6a21\u677f\u7684\u63d0\u793a\u8bcd\u7ba1\u7406&#xff0c;\u65b9\u4fbf\u590d\u7528\u548c\u53c2\u6570\u5316&#xff1a;<\/p>\n<p>import org.springframework.ai.chat.prompt.PromptTemplate;<\/p>\n<p>public String generateGreeting(String name) {<br \/>\n    PromptTemplate template &#061; new PromptTemplate(&#034;\u4f60\u597d&#xff0c;{name}&#xff01;\u8bf7\u7528\u4e00\u53e5\u8bdd\u4ecb\u7ecd\u4f60\u81ea\u5df1\u3002&#034;);<br \/>\n    return chatClient.call(template.create(Map.of(&#034;name&#034;, name)));<br \/>\n}<\/p>\n<h4>5.2 \u8f93\u51fa\u89e3\u6790<\/h4>\n<p>\u901a\u8fc7\u8f93\u51fa\u89e3\u6790\u5668&#xff0c;\u53ef\u4ee5\u5c06\u6a21\u578b\u8fd4\u56de\u7684\u6587\u672c\u81ea\u52a8\u8f6c\u6362\u4e3a\u7ed3\u6784\u5316\u5bf9\u8c61&#xff1a;<\/p>\n<p>import org.springframework.ai.parser.BeanOutputParser;<\/p>\n<p>public Book parseBook(String description) {<br \/>\n    BeanOutputParser&lt;Book&gt; parser &#061; new BeanOutputParser&lt;&gt;(Book.class);<br \/>\n    String message &#061; &#034;\u8bf7\u6839\u636e\u4ee5\u4e0b\u63cf\u8ff0\u63d0\u53d6\u4e66\u7c4d\u4fe1\u606f&#xff1a;&#034; &#043; description;<br \/>\n    String output &#061; chatClient.call(message);<br \/>\n    return parser.parse(output);<br \/>\n}<\/p>\n<h4>5.3 \u591a\u8f6e\u5bf9\u8bdd<\/h4>\n<p>Spring AI \u652f\u6301\u7ef4\u62a4\u5bf9\u8bdd\u4e0a\u4e0b\u6587&#xff0c;\u5b9e\u73b0\u591a\u8f6e\u4ea4\u4e92&#xff1a;<\/p>\n<p>import org.springframework.ai.chat.messages.UserMessage;<br \/>\nimport org.springframework.ai.chat.messages.SystemMessage;<br \/>\nimport org.springframework.ai.chat.messages.AssistantMessage;<\/p>\n<p>public String chatWithHistory(List&lt;String&gt; history) {<br \/>\n    List&lt;Message&gt; messages &#061; new ArrayList&lt;&gt;();<br \/>\n    messages.add(new SystemMessage(&#034;\u4f60\u662f\u4e00\u4e2a\u4e50\u4e8e\u52a9\u4eba\u7684\u52a9\u624b\u3002&#034;));<br \/>\n    for (String turn : history) {<br \/>\n        messages.add(new UserMessage(turn));<br \/>\n    }<br \/>\n    return chatClient.call(new Prompt(messages)).getResult().getOutput().getContent();<br \/>\n}<\/p>\n<h3>6. \u5b9e\u9645\u5e94\u7528\u573a\u666f<\/h3>\n<p>Spring AI \u53ef\u4ee5\u5e94\u7528\u4e8e\u591a\u79cd\u4e1a\u52a1\u573a\u666f&#xff0c;\u4ee5\u4e0b\u5217\u4e3e\u51e0\u4e2a\u5178\u578b\u793a\u4f8b\u3002<\/p>\n<h4>6.1 \u667a\u80fd\u5ba2\u670d<\/h4>\n<p>\u7ed3\u5408\u77e5\u8bc6\u5e93\u548c\u68c0\u7d22\u589e\u5f3a\u751f\u6210&#xff08;RAG&#xff09;\u6280\u672f&#xff0c;\u6784\u5efa\u4f01\u4e1a\u7ea7\u667a\u80fd\u5ba2\u670d\u7cfb\u7edf&#xff0c;\u81ea\u52a8\u56de\u7b54\u7528\u6237\u5e38\u89c1\u95ee\u9898\u3002<\/p>\n<h4>6.2 \u5185\u5bb9\u751f\u6210<\/h4>\n<p>\u5229\u7528\u5927\u6a21\u578b\u7684\u6587\u672c\u751f\u6210\u80fd\u529b&#xff0c;\u81ea\u52a8\u64b0\u5199\u6587\u7ae0\u6458\u8981\u3001\u8425\u9500\u6587\u6848\u3001\u4ea7\u54c1\u63cf\u8ff0\u7b49\u5185\u5bb9\u3002<\/p>\n<h4>6.3 \u4ee3\u7801\u8f85\u52a9<\/h4>\n<p>\u96c6\u6210\u5230\u5f00\u53d1\u5de5\u5177\u4e2d&#xff0c;\u63d0\u4f9b\u4ee3\u7801\u8865\u5168\u3001\u6ce8\u91ca\u751f\u6210\u3001Bug \u4fee\u590d\u5efa\u8bae\u7b49\u80fd\u529b\u3002<\/p>\n<h3>7. \u603b\u7ed3<\/h3>\n<p>Spring AI \u4e3a Java \u5f00\u53d1\u8005\u63d0\u4f9b\u4e86\u4e00\u6761\u4f4e\u95e8\u69db\u63a5\u5165\u5927\u6a21\u578b\u5e94\u7528\u7684\u8def\u5f84\u3002\u901a\u8fc7\u7edf\u4e00\u7684\u62bd\u8c61\u63a5\u53e3\u548c Spring \u751f\u6001\u7684\u5929\u7136\u96c6\u6210&#xff0c;\u5f00\u53d1\u8005\u53ef\u4ee5\u5feb\u901f\u6784\u5efa\u51fa\u529f\u80fd\u4e30\u5bcc\u7684 AI \u5e94\u7528\u3002<\/p>\n<p>\u5efa\u8bae\u8bfb\u8005\u4ece\u5b98\u65b9\u6587\u6863\u5165\u624b&#xff0c;\u7ed3\u5408\u672c\u6587\u793a\u4f8b\u52a8\u624b\u5b9e\u8df5&#xff0c;\u9010\u6b65\u638c\u63e1\u63d0\u793a\u8bcd\u5de5\u7a0b\u3001\u8f93\u51fa\u89e3\u6790\u3001RAG \u7b49\u8fdb\u9636\u80fd\u529b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u5f15\u8a00\u968f\u7740\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u7684\u5feb\u901f\u53d1\u5c55&#xff0c;\u8d8a\u6765\u8d8a\u591a\u7684\u5f00\u53d1\u8005\u5e0c\u671b\u5c06 AI \u80fd\u529b\u96c6\u6210\u5230\u81ea\u5df1\u7684\u5e94\u7528\u4e2d\u3002Spring AI \u662f Spring \u751f\u6001\u4e2d\u9762\u5411 AI \u5e94\u7528\u5f00\u53d1\u7684\u5b98\u65b9\u9879\u76ee&#xff0c;\u5b83\u63d0\u4f9b\u4e86\u4e00\u5957\u7edf\u4e00\u7684\u62bd\u8c61\u5c42&#xff0c;\u8ba9\u5f00\u53d1\u8005\u53ef\u4ee5\u7528\u719f\u6089\u7684 Spring \u7f16\u7a0b\u6a21\u578b\u5feb\u901f\u63a5\u5165\u5404\u7c7b\u5927\u6a21\u578b\u670d\u52a1\u3002\u672c\u6587\u5c06\u4ece\u96f6\u5f00\u59cb&#xff0c;\u4ecb\u7ecd Spring AI \u7684\u6838\u5fc3\u6982\u5ff5\u3001\u73af\u5883\u642d\u5efa\u3001\u57fa\u7840\u7528\u6cd5\u4ee5\u53ca\u5b9e\u9645\u5e94\u7528\u573a\u666f&#xff0c;\u5e2e\u52a9\u8bfb\u8005\u5feb\u901f\u4e0a\u624b\u30022.<\/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":[153,101,50],"topic":[],"class_list":["post-98799","post","type-post","status-publish","format-standard","hentry","category-server","tag-flask","tag-spring","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 \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528 - \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\/98799.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring AI \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"1. \u5f15\u8a00\u968f\u7740\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u7684\u5feb\u901f\u53d1\u5c55&#xff0c;\u8d8a\u6765\u8d8a\u591a\u7684\u5f00\u53d1\u8005\u5e0c\u671b\u5c06 AI \u80fd\u529b\u96c6\u6210\u5230\u81ea\u5df1\u7684\u5e94\u7528\u4e2d\u3002Spring AI \u662f Spring \u751f\u6001\u4e2d\u9762\u5411 AI \u5e94\u7528\u5f00\u53d1\u7684\u5b98\u65b9\u9879\u76ee&#xff0c;\u5b83\u63d0\u4f9b\u4e86\u4e00\u5957\u7edf\u4e00\u7684\u62bd\u8c61\u5c42&#xff0c;\u8ba9\u5f00\u53d1\u8005\u53ef\u4ee5\u7528\u719f\u6089\u7684 Spring \u7f16\u7a0b\u6a21\u578b\u5feb\u901f\u63a5\u5165\u5404\u7c7b\u5927\u6a21\u578b\u670d\u52a1\u3002\u672c\u6587\u5c06\u4ece\u96f6\u5f00\u59cb&#xff0c;\u4ecb\u7ecd Spring AI \u7684\u6838\u5fc3\u6982\u5ff5\u3001\u73af\u5883\u642d\u5efa\u3001\u57fa\u7840\u7528\u6cd5\u4ee5\u53ca\u5b9e\u9645\u5e94\u7528\u573a\u666f&#xff0c;\u5e2e\u52a9\u8bfb\u8005\u5feb\u901f\u4e0a\u624b\u30022.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/98799.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-01T04:57:06+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\/98799.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/98799.html\",\"name\":\"Spring AI \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-01T04:57:06+00:00\",\"dateModified\":\"2026-09-01T04:57:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/98799.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/98799.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98799.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Spring AI \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528\"}]},{\"@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 \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528 - \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\/98799.html","og_locale":"zh_CN","og_type":"article","og_title":"Spring AI \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"1. \u5f15\u8a00\u968f\u7740\u5927\u8bed\u8a00\u6a21\u578b&#xff08;LLM&#xff09;\u7684\u5feb\u901f\u53d1\u5c55&#xff0c;\u8d8a\u6765\u8d8a\u591a\u7684\u5f00\u53d1\u8005\u5e0c\u671b\u5c06 AI \u80fd\u529b\u96c6\u6210\u5230\u81ea\u5df1\u7684\u5e94\u7528\u4e2d\u3002Spring AI \u662f Spring \u751f\u6001\u4e2d\u9762\u5411 AI \u5e94\u7528\u5f00\u53d1\u7684\u5b98\u65b9\u9879\u76ee&#xff0c;\u5b83\u63d0\u4f9b\u4e86\u4e00\u5957\u7edf\u4e00\u7684\u62bd\u8c61\u5c42&#xff0c;\u8ba9\u5f00\u53d1\u8005\u53ef\u4ee5\u7528\u719f\u6089\u7684 Spring \u7f16\u7a0b\u6a21\u578b\u5feb\u901f\u63a5\u5165\u5404\u7c7b\u5927\u6a21\u578b\u670d\u52a1\u3002\u672c\u6587\u5c06\u4ece\u96f6\u5f00\u59cb&#xff0c;\u4ecb\u7ecd Spring AI \u7684\u6838\u5fc3\u6982\u5ff5\u3001\u73af\u5883\u642d\u5efa\u3001\u57fa\u7840\u7528\u6cd5\u4ee5\u53ca\u5b9e\u9645\u5e94\u7528\u573a\u666f&#xff0c;\u5e2e\u52a9\u8bfb\u8005\u5feb\u901f\u4e0a\u624b\u30022.","og_url":"https:\/\/www.wsisp.com\/helps\/98799.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-01T04:57:06+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\/98799.html","url":"https:\/\/www.wsisp.com\/helps\/98799.html","name":"Spring AI \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-01T04:57:06+00:00","dateModified":"2026-09-01T04:57:06+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/98799.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/98799.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/98799.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Spring AI \u5165\u95e8\u6307\u5357\uff1a\u4ece\u96f6\u6784\u5efa\u667a\u80fd\u5e94\u7528"}]},{"@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\/98799","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=98799"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98799\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=98799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=98799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=98799"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=98799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}