From 75970f07b14ce10093a0a4f3975517b20d58b5ca Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 20 May 2026 09:42:02 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#557:=20ApplicationConfig=20?= =?UTF-8?q?=E5=85=A8=E5=B1=80=20Jackson=20LocalDateTime=20=E5=8F=8D?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E5=99=A8=E7=BC=BA=E5=A4=B1=20?= =?UTF-8?q?=E2=80=94=20=E6=A0=B9=E5=9B=A0=EF=BC=9AJavaTimeModule=20?= =?UTF-8?q?=E4=BB=85=E6=B3=A8=E5=86=8C=E4=BA=86=20LocalDateTimeSerializer?= =?UTF-8?q?=EF=BC=8C=E6=9C=AA=E6=B3=A8=E5=86=8C=20LocalDateTimeDeserialize?= =?UTF-8?q?r=EF=BC=8C=E5=AF=BC=E8=87=B4=E9=BB=98=E8=AE=A4=E5=8F=8D?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E5=99=A8=E6=9C=9F=E6=9C=9B=20ISO-86?= =?UTF-8?q?01=20=E6=A0=BC=E5=BC=8F=EF=BC=88T=20=E5=88=86=E9=9A=94=E7=AC=A6?= =?UTF-8?q?=EF=BC=89=EF=BC=8C=E4=B8=8E=E5=89=8D=E7=AB=AF=20el-date-picker?= =?UTF-8?q?=20=E7=A9=BA=E6=A0=BC=E5=88=86=E9=9A=94=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=EF=BC=88YYYY-MM-DD=20HH:mm:ss=EF=BC=89=E4=B8=8D=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=EF=BC=9B=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20LocalDateTimeDeserializer(pattern=3D"yyyy-MM-dd=20HH:mm:ss")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../java/com/core/framework/config/ApplicationConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java b/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java index c843a30a..a36d518a 100755 --- a/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java +++ b/openhis-server-new/core-framework/src/main/java/com/core/framework/config/ApplicationConfig.java @@ -35,7 +35,9 @@ public class ApplicationConfig { // 设置日期格式为 yyyy/M/d HH:mm:ss,支持多种格式反序列化 builder.simpleDateFormat("yyyy/M/d HH:mm:ss"); // 添加JavaTimeModule支持,用于LocalDateTime - builder.modules(new JavaTimeModule()); + JavaTimeModule javaTimeModule = new JavaTimeModule(); + javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + builder.modules(javaTimeModule); builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy/M/d HH:mm:ss"))); }; }