Browse Source

fix:【ai 大模型】修复 mcp webflux 依赖,导致 SSE Server 失效的问题

YunaiV 9 months ago
parent
commit
d674d68a73
1 changed files with 8 additions and 3 deletions
  1. 8 3
      yudao-module-ai/pom.xml

+ 8 - 3
yudao-module-ai/pom.xml

@@ -187,17 +187,22 @@
             </exclusions>
         </dependency>
 
+        <!-- MCP 相关 -->
+        <!--
+            特殊说明:不能使用 spring-ai-starter-mcp-server-webflux 或 spring-ai-starter-mcp-client-webflux !!!
+            原因:项目使用了 SpringMVC,而不是 WebFlux。引入上述 2 个,会导致 SSE Server 失效。
+        -->
         <dependency>
+            <!-- 服务端 -->
             <groupId>org.springframework.ai</groupId>
             <artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
             <version>${spring-ai.version}</version>
         </dependency>
-
         <dependency>
+            <!-- 客户端 -->
             <groupId>org.springframework.ai</groupId>
-            <artifactId>spring-ai-starter-mcp-client-webflux</artifactId>
+            <artifactId>spring-ai-starter-mcp-client</artifactId>
             <version>${spring-ai.version}</version>
-            <optional>true</optional>
         </dependency>
 
         <!-- TinyFlow:AI 工作流 -->