Spring Boot 4.0.6 默认引入 Jackson 3.1.2,但项目中 1018 处 @JsonSerialize 注解使用的是 Jackson 2 的 com.fasterxml.jackson.* 包,导致注解被忽略, Long 字段序列化为裸数字,引发前端 JS Number 精度丢失(Bug #681 的根因)。 - com.fasterxml.jackson.databind.* → tools.jackson.databind.* - com.fasterxml.jackson.core.* → tools.jackson.core.* - com.fasterxml.jackson.annotation.* 保留(Jackson 3 仍用同包名) - com.fasterxml.jackson.datatype.jsr310.* 保留(不再需要,Jackson 3 内置 JavaTime 支持) - JsonSerializer<T> → ValueSerializer<T> - JsonDeserializer<T> → ValueDeserializer<T> - SerializerProvider → SerializationContext - JsonMappingException → DatabindException - JsonProcessingException → JacksonException(变 RuntimeException) - ContextualSerializer → 合并入 ValueSerializer(createContextual 成 default 方法) - LaissezFaireSubTypeValidator → BasicPolymorphicTypeValidator.builder() - Jackson2ObjectMapperBuilderCustomizer → JsonMapperBuilderCustomizer - ObjectMapper.configure() 返回 void → JsonMapper.builder().disable(...).build() - ObjectMapper.setPropertyNamingStrategy() → JsonMapper.builder().propertyNamingStrategy() - ObjectMapper.setDateFormat() → JsonMapper.builder().defaultDateFormat() - ObjectNode.fieldNames() → JsonNode.propertyNames()(返回 Collection<String>) - SerializationFeature.WRITE_DATES_AS_TIMESTAMPS 已移除(JavaTime 自动处理) - ObjectMapper 的 JavaTimeModule 注册不再需要(Jackson 3 内置) - core-framework/.../ApplicationConfig.java:重写为 JsonMapperBuilderCustomizer + 自定义 LocalDateTime 序列化(Jackson 3 内置 ext.javatime.*) - core-framework/.../FastJson2JsonRedisSerializer.java:用 BasicPolymorphicTypeValidator 替代 LaissezFaireSubTypeValidator - core-common/.../JsonUtils.java:改为 JsonMapper.builder() 模式 - core-common/.../SensitiveJsonSerializer.java:JsonSerializer → ValueSerializer - 5 个模块 jackson-databind groupId 改为 tools.jackson.core(版本由 Spring Boot BOM 管理) - jackson-annotations 保留 com.fasterxml.jackson.core(Jackson 3 仍用同包名) - ✅ mvn compile 全 11 模块通过 - ✅ mvn package 成功生成 fat JAR - ✅ 后端启动正常(JDK 25,Spring Boot 4.0.6) - ✅ 登录 API 返回 JWT token - ✅ /charge-manage/charge/encounter-patient-page 响应: - encounterId: "2032288214655660033"(字符串,@JsonSerialize 生效) - patientId: "2026486681850499074"(字符串,@JsonSerialize 生效) - ✅ Bug #681 根因彻底解决(Long 精度丢失) - Bug #681(前端兜底 fix: acf685fba)+ 本 commit(后端根治) - Bug #281(历史 jsr310 模块问题)随 Jackson 3 内置 JavaTime 一并解决 - Playwright E2E 全量回归(51 个 spec) - 时间字段序列化专项测试(LocalDateTime 格式验证) - 删除 Jackson 2 starter(spring-boot-jackson2)的可行性评估
105 lines
3.4 KiB
XML
Executable File
105 lines
3.4 KiB
XML
Executable File
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<parent>
|
|
<groupId>com.healthlink.his</groupId>
|
|
<artifactId>healthlink-his-server</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
</parent>
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<groupId>com.core</groupId>
|
|
<artifactId>core-flowable</artifactId>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
<groupId>com.core</groupId>
|
|
<artifactId>core-framework</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.core</groupId>
|
|
<artifactId>core-system</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.core</groupId>
|
|
<artifactId>core-common</artifactId>
|
|
</dependency>
|
|
|
|
<!--常用工具类 -->
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
</dependency>
|
|
|
|
<!-- JSON工具类 -->
|
|
<dependency>
|
|
<groupId>tools.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
</dependency>
|
|
|
|
<!-- 阿里JSON解析器 -->
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.flowable</groupId>
|
|
<artifactId>flowable-spring-boot-starter</artifactId>
|
|
<!-- 排除flowable自带的权限认证 -->
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.flowable</groupId>
|
|
<artifactId>flowable-spring-security</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
|
</exclusion>
|
|
<exclusion>
|
|
<groupId>org.jetbrains.kotlin</groupId>
|
|
<artifactId>kotlin-reflect</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<!-- websocket -->
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-websocket</artifactId>
|
|
</dependency>
|
|
|
|
<!--el表达式计算-->
|
|
<dependency>
|
|
<groupId>com.googlecode.aviator</groupId>
|
|
<artifactId>aviator</artifactId>
|
|
<version>5.3.3</version>
|
|
</dependency>
|
|
|
|
<!-- swagger 注解 -->
|
|
<dependency>
|
|
<groupId>io.swagger.core.v3</groupId>
|
|
<artifactId>swagger-annotations-jakarta</artifactId>
|
|
<version>2.2.30</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<!-- <build>-->
|
|
<!-- <plugins>-->
|
|
<!-- <plugin>-->
|
|
<!-- <groupId>org.springframework.boot</groupId>-->
|
|
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
|
<!-- </plugin>-->
|
|
<!-- </plugins>-->
|
|
<!-- </build>-->
|
|
|
|
</project>
|