Files
hospital-front/pom.xml
T
lianlonggangandClaude 545fa38789 fix: 修复 GET 接口返回 toString 而非 JSON 的关键缺陷 + 测试库联调修复 + 日志实时推送
关键修复:
- 引入 solon-serialization-snack3 渲染插件:无 Accept 头的 GET 请求
  之前返回对象 toString(非法响应),现统一输出标准 JSON
- saveOrder/addUnit:Solon @Body Map 泛型反序列化为空,改收原始
  String + snack3 手动解析
- Oracle CLOB 直接进 Map 显示为对象句柄:bsm XML 包 DBMS_LOB.SUBSTR
- SqlServer 中文丢失:去掉 cast(NVARCHAR as varchar(8000)) 有损转换;
  XML 中文字面量加 N 前缀(状态字典/完成标记)
- /api/admin/log/tail 解码异常:历史日志混 GBK 内容,改容错解码

新增:
- LogStreamManager:日志实时推送(LOG_TAIL_CTRL 控制 + LOG_BATCH
  增量上报,多文件并行、游标推进、滚动重置检测)
- mock_b_server.py:最小 WS 模拟 B 端(联调工具)

实测(真实 Oracle/SqlServer 测试库):
- 三方言(bsm/nx/ya)20 个业务接口全部通过
- saveOrder 存储过程:PE00100008 / NX00000003 / YA00000002
- 中文入库/查询/汇总全链路正常
- 日志流端到端:B 下发命令 → Agent 增量推送 → B 收到 LOG_BATCH

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-21 13:59:54 +08:00

241 lines
9.1 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
Solon 版本说明:
- Maven Central 上 solon-parent 最新是 4.0.6(短横线命名)
- 但 mybatis-solon-plugin 4.0.6 与 solon 4.0.6 存在 ABI 不兼容(NoSuchMethodError
- 退回 solon-parent 3.10.7(点号命名,生态完整稳定,已实测可启动)
-->
<parent>
<groupId>org.noear</groupId>
<artifactId>solon-parent</artifactId>
<version>3.10.7</version>
<relativePath/>
</parent>
<groupId>com.hospital</groupId>
<artifactId>hospital-front</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>hospital-front</name>
<description>医院前置机程序(Kotlin + Solon 3.10.7</description>
<properties>
<!-- JDK 与 Kotlin(覆盖 solon-parent 的 java.version=1.8 -->
<java.version>17</java.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<kotlin.version>2.0.21</kotlin.version>
<kotlin.jvmTarget>17</kotlin.jvmTarget>
<!-- 数据库驱动(solon-parent 不管理) -->
<ojdbc.version>23.3.0.23.09</ojdbc.version>
<mssql-jdbc.version>12.6.1.jre11</mssql-jdbc.version>
<sqlite-jdbc.version>3.46.1.0</sqlite-jdbc.version>
<!-- 鉴权 -->
<sa-token.version>1.39.0</sa-token.version>
</properties>
<dependencies>
<!-- ========== Solon 核心 ========== -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon</artifactId>
</dependency>
<!-- Solon Web 服务器(smart-http 异步) -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-server-smarthttp</artifactId>
</dependency>
<!-- Solon YAML 配置支持 -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-config-yaml</artifactId>
</dependency>
<!-- Solon Logback 日志桥接 -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-logging-logback-jakarta</artifactId>
</dependency>
<!-- Solon 调度(@Scheduled 注解) -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-scheduling</artifactId>
</dependency>
<!-- ========== MyBatis-Plus 集成 ========== -->
<!-- Solon 官方插件(与 Solon 3.10.x ABI 兼容) -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>mybatis-plus-solon-plugin</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>3.5.9</version>
</dependency>
<!-- ========== 数据库驱动 ========== -->
<!-- 连接池(Solon 数据源类型) -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>5.1.0</version>
</dependency>
<!-- Oracle -->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>${ojdbc.version}</version>
</dependency>
<!-- SqlServer -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>${mssql-jdbc.version}</version>
</dependency>
<!-- SQLiteB 端 Agent 用) -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite-jdbc.version}</version>
</dependency>
<!-- H2(开发 Mock 数据源) -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.3.232</version>
<scope>runtime</scope>
</dependency>
<!-- ========== HTTP / WebSocketAgent 用) ========== -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</dependency>
<!-- ========== 鉴权(可选,按需启用) ========== -->
<dependency>
<groupId>cn.dev33</groupId>
<artifactId>sa-token-solon-plugin</artifactId>
<version>${sa-token.version}</version>
<optional>true</optional>
</dependency>
<!-- ========== Kotlin 标准库 ========== -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<!-- ========== JSON 解析(Solon 生态标准库) ========== -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
</dependency>
<!-- Solon JSON 渲染插件(HTTP 响应自动序列化为 JSON -->
<dependency>
<groupId>org.noear</groupId>
<artifactId>solon-serialization-snack3</artifactId>
</dependency>
<!-- ========== 测试 ========== -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit5</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>hospital-front-${project.version}</finalName>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<!-- Kotlin 编译 -->
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<configuration>
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
<jvmTarget>${kotlin.jvmTarget}</jvmTarget>
</configuration>
<executions>
<execution>
<id>compile</id>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- 打 fat jar(包含所有依赖) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.hospital.front.HospitalFrontAppKt</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<finalName>hospital-front-${project.version}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>