Files
xiaoqu_mcp_service/xiaoqu-agent-service/pom.xml
T
my_local_kimi_dev2 8d8e71e45c 新增 MCP 工具 district.paper.statistics.query(客户用纸统计)并引入 ES 7.17 客户端
- 复刻老 MonthlyStatisticsController.getMonthlyStatisticsMap:m0 monthly_statistics 按 gender/按日聚合(用纸长度米、人次、台日),district_strategy.rfid_use_flag 分口径统计 ES paperuselog 换纸卷数
- ES 双集群(云/本地,Dictionary.LocalEsDate 分界)+ 冷热索引(90 天),terms 聚合统计 rfid 去重数替代老 scroll 拉全量
- 引入 co.elastic.clients:elasticsearch-java 7.17.29(显式钉版本,覆盖 Boot BOM 8.x),EsClientConfig 双集群客户端
- 字典缺失/ES 异常 fail fast 抛 IllegalStateException(老系统静默为 0);district_strategy 缺失按未使用 rfid 口径(老系统 NPE)
- 新增单测 16 个(工具 13 + planner 3),全套 303 个单测通过
2026-09-20 18:48:30 +08:00

180 lines
6.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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(低阶 RestClient)与 jakarta json -->
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</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>