186 lines
7.2 KiB
XML
186 lines
7.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
|
||
<!--
|
||
版本组合(2026-09-03 实测验证通过):
|
||
Spring Boot 3.5.16 + Spring AI 1.1.8 + MyBatis-Plus 3.5.12 + JDK 17
|
||
背景:Spring Boot 3.5.x + Spring AI 1.0.0 的 streamable MCP 传输存在 NPE
|
||
(spring-projects/spring-ai#6274),已在 Spring AI 1.0.1+ / 1.1.x 修复。
|
||
本工程选用 Spring AI 1.1.8(已修复版本),STREAMABLE 握手实测通过,详见 README.md。
|
||
-->
|
||
<parent>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-parent</artifactId>
|
||
<version>3.5.16</version>
|
||
<relativePath/>
|
||
</parent>
|
||
|
||
<groupId>me.iiv</groupId>
|
||
<artifactId>xiaoqu-agent-service</artifactId>
|
||
<version>0.1.0-SNAPSHOT</version>
|
||
<name>xiaoqu-agent-service</name>
|
||
<description>面向 MCP 客户端的小趣业务数据服务(只读查询现有三库)</description>
|
||
|
||
<properties>
|
||
<java.version>17</java.version>
|
||
<spring-ai.version>1.1.8</spring-ai.version>
|
||
<mybatis-plus.version>3.5.12</mybatis-plus.version>
|
||
</properties>
|
||
|
||
<dependencyManagement>
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.springframework.ai</groupId>
|
||
<artifactId>spring-ai-bom</artifactId>
|
||
<version>${spring-ai.version}</version>
|
||
<type>pom</type>
|
||
<scope>import</scope>
|
||
</dependency>
|
||
</dependencies>
|
||
</dependencyManagement>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-web</artifactId>
|
||
</dependency>
|
||
|
||
<!-- MCP Server(Streamable HTTP,端点 /mcp) -->
|
||
<dependency>
|
||
<groupId>org.springframework.ai</groupId>
|
||
<artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
|
||
</dependency>
|
||
|
||
<!-- MyBatis-Plus(Spring Boot 3 starter) -->
|
||
<dependency>
|
||
<groupId>com.baomidou</groupId>
|
||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||
<version>${mybatis-plus.version}</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.mysql</groupId>
|
||
<artifactId>mysql-connector-j</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.flywaydb</groupId>
|
||
<artifactId>flyway-core</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.flywaydb</groupId>
|
||
<artifactId>flyway-mysql</artifactId>
|
||
</dependency>
|
||
|
||
<!-- Redis(db5,用户热缓存/字典,P1 仅做连通性自检) -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||
</dependency>
|
||
|
||
<!-- Elasticsearch 客户端:老集群为 7.x,必须显式钉 7.17(Boot BOM 管理的是 8.x)。
|
||
elasticsearch-java 与低阶 elasticsearch-rest-client 都要钉——只钉前者的话
|
||
rest-client 会被 Boot BOM 顶成 8.x,运行期 NoSuchMethodError(SafeResponseConsumer) -->
|
||
<dependency>
|
||
<groupId>co.elastic.clients</groupId>
|
||
<artifactId>elasticsearch-java</artifactId>
|
||
<version>7.17.29</version>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.elasticsearch.client</groupId>
|
||
<artifactId>elasticsearch-rest-client</artifactId>
|
||
<version>7.17.29</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
<optional>true</optional>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-test</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>com.h2database</groupId>
|
||
<artifactId>h2</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
|
||
<!-- codegen(run-once,仅 test scope,不进主启动流程) -->
|
||
<dependency>
|
||
<groupId>com.baomidou</groupId>
|
||
<artifactId>mybatis-plus-generator</artifactId>
|
||
<version>${mybatis-plus.version}</version>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.freemarker</groupId>
|
||
<artifactId>freemarker</artifactId>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<finalName>xiaoqu-agent-service</finalName>
|
||
<resources>
|
||
<resource>
|
||
<directory>src/main/resources</directory>
|
||
</resource>
|
||
<resource>
|
||
<directory>front/dist</directory>
|
||
<targetPath>static</targetPath>
|
||
</resource>
|
||
</resources>
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>com.github.eirslett</groupId>
|
||
<artifactId>frontend-maven-plugin</artifactId>
|
||
<version>1.15.1</version>
|
||
<configuration>
|
||
<workingDirectory>front</workingDirectory>
|
||
<installDirectory>target</installDirectory>
|
||
</configuration>
|
||
<executions>
|
||
<execution>
|
||
<id>install-node-and-npm</id>
|
||
<goals><goal>install-node-and-npm</goal></goals>
|
||
<configuration>
|
||
<nodeVersion>v20.20.2</nodeVersion>
|
||
<!-- provided = 使用 node 自带的 npm, 无需单独下载 -->
|
||
<npmVersion>provided</npmVersion>
|
||
<!-- 国内镜像, 避免 nodejs.org 直连超时 -->
|
||
<downloadRoot>https://npmmirror.com/mirrors/node/</downloadRoot>
|
||
</configuration>
|
||
</execution>
|
||
<execution>
|
||
<id>npm-ci</id>
|
||
<goals><goal>npm</goal></goals>
|
||
<configuration><arguments>ci</arguments></configuration>
|
||
</execution>
|
||
<execution>
|
||
<id>npm-build</id>
|
||
<goals><goal>npm</goal></goals>
|
||
<configuration><arguments>run build</arguments></configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
<plugin>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||
<configuration>
|
||
<excludes>
|
||
<exclude>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
</exclude>
|
||
</excludes>
|
||
</configuration>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
</project>
|