eureka
tanghc 4 years ago
parent 73fbd7a072
commit 008c0f830f
  1. 2
      sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/config/SopGatewayEnvironmentPostProcessor.java

@ -42,7 +42,7 @@ public class SopGatewayEnvironmentPostProcessor implements EnvironmentPostProces
private void initMemSize(Properties properties) { private void initMemSize(Properties properties) {
String maxFileSizeKey = "spring.servlet.multipart.max-file-size"; String maxFileSizeKey = "spring.servlet.multipart.max-file-size";
String maxMemSizeKey = "spring.codec.max-in-memory-size"; String maxMemSizeKey = "spring.codec.max-in-memory-size";
String defaultSize = "10M"; String defaultSize = "10MB";
String maxUploadSize = properties.getProperty(maxFileSizeKey, defaultSize); String maxUploadSize = properties.getProperty(maxFileSizeKey, defaultSize);
String maxBodySize = properties.getProperty(maxMemSizeKey, defaultSize); String maxBodySize = properties.getProperty(maxMemSizeKey, defaultSize);
long size = Math.max(DataSize.parse(maxUploadSize).toBytes(), DataSize.parse(maxBodySize).toBytes()); long size = Math.max(DataSize.parse(maxUploadSize).toBytes(), DataSize.parse(maxBodySize).toBytes());

Loading…
Cancel
Save