From fa45ecfd1dbea4817a3f260c85b44b666e00a4f4 Mon Sep 17 00:00:00 2001 From: lucian Date: Thu, 14 May 2020 17:33:09 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-31261=20WangEditor=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/start/server/FineEmbedServerActivator.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java index a67b7e55a8..33232c6601 100644 --- a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java +++ b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java @@ -62,6 +62,7 @@ public class FineEmbedServerActivator extends Activator { tomcat.setPort(DesignerEnvManager.getEnvManager().getEmbedServerPort()); // 设置解码uri使用的字符编码 tomcat.getConnector().setURIEncoding(EncodeConstants.ENCODING_UTF_8); + setMaxPostSize(); String docBase = new File(WorkContext.getCurrent().getPath()).getParent(); //内置的上下文使用工程目录比如webroot @@ -79,6 +80,18 @@ public class FineEmbedServerActivator extends Activator { context.addServletContainerInitializer(initializer, classes); } + // tomcat的maxPostSize会影响到post参数获取,默认2M + private void setMaxPostSize() { + + if (System.getProperty("tomcat-maxPostSize") != null) { + try { + tomcat.getConnector().setMaxPostSize(Integer.parseInt(System.getProperty("tomcat-maxPostSize"))); + } catch (Exception e) { + FineLoggerFactory.getLogger().error("maxPostSize error: " + e.getMessage(), e); + } + } + } + private void stopServerActivator() {