From b020d835d44c0e58579abe49c92928de8213a453 Mon Sep 17 00:00:00 2001 From: liuchen864 <23082234@qq.com> Date: Wed, 3 Apr 2024 15:16:04 +0800 Subject: [PATCH] =?UTF-8?q?fastjson=E5=86=85=E5=AD=98=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- win-admin/src/main/java/com/win/web/WinApplication.java | 4 ++++ win-admin/src/main/resources/application.yml | 2 ++ .../main/java/com/win/system/service/LinuxAccessService.java | 1 - 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/win-admin/src/main/java/com/win/web/WinApplication.java b/win-admin/src/main/java/com/win/web/WinApplication.java index e5d30ba..6d4570f 100644 --- a/win-admin/src/main/java/com/win/web/WinApplication.java +++ b/win-admin/src/main/java/com/win/web/WinApplication.java @@ -1,11 +1,14 @@ package com.win.web; import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; +import com.alibaba.fastjson2.JSON; import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import static com.alibaba.fastjson2.JSONWriter.Feature.LargeObject; + /** * 启动程序 * @@ -20,6 +23,7 @@ public class WinApplication { public static void main(String[] args) { // System.setProperty("spring.devtools.restart.enabled", "false"); SpringApplication.run(WinApplication.class, args); + JSON.config(LargeObject, true); System.out.println("闻音启动成功"); } diff --git a/win-admin/src/main/resources/application.yml b/win-admin/src/main/resources/application.yml index d921ed3..d0d3c05 100644 --- a/win-admin/src/main/resources/application.yml +++ b/win-admin/src/main/resources/application.yml @@ -6,6 +6,8 @@ spring: active: dev main: allow-bean-definition-overriding: true + tomcat: + max-http-post-size: -1 servlet: multipart: enabled: true diff --git a/win-system/src/main/java/com/win/system/service/LinuxAccessService.java b/win-system/src/main/java/com/win/system/service/LinuxAccessService.java index 2aa3ec9..48ffa6b 100644 --- a/win-system/src/main/java/com/win/system/service/LinuxAccessService.java +++ b/win-system/src/main/java/com/win/system/service/LinuxAccessService.java @@ -109,7 +109,6 @@ public class LinuxAccessService extends ServiceImpl