From 2555f48b6a428ac213dac377fa500678a1aa5139 Mon Sep 17 00:00:00 2001 From: User_cyk <1020691186@qq.com> Date: Fri, 7 Jul 2023 11:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/service/projectService.java | 3 ++- src/com/hellogithub/servlet/UploadHandleServlet.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/hellogithub/service/projectService.java b/src/com/hellogithub/service/projectService.java index d8d5d8d..1d286b9 100644 --- a/src/com/hellogithub/service/projectService.java +++ b/src/com/hellogithub/service/projectService.java @@ -42,12 +42,13 @@ public class projectService { now =projectEntity.getCategoryName(); if(i == 0) tem = now; if(!tem.equals(now)){ - tem=now; dataMap.put(tem,projectEntityListTem); + tem=now; projectEntityListTem = new ArrayList<>(); } projectEntityListTem.add(projectEntity); } + if(projectEntityListTem.size()!= 0) dataMap.put(now,projectEntityListTem); return JSONObject.toJSONString(dataMap); diff --git a/src/com/hellogithub/servlet/UploadHandleServlet.java b/src/com/hellogithub/servlet/UploadHandleServlet.java index dcd5bc7..1ff0898 100644 --- a/src/com/hellogithub/servlet/UploadHandleServlet.java +++ b/src/com/hellogithub/servlet/UploadHandleServlet.java @@ -91,7 +91,7 @@ public class UploadHandleServlet extends HttpServlet { - //设置上传单个文件的大小的最大值,目前是设置为1024*1024字节,也就是2MB + //设置上传单个文件的大小的最大值,目前是设置为1024*1024字节,也就是10MB upload.setFileSizeMax(1024*1024*1024*10); //设置上传文件总量的最大值,最大值=同时上传的多个文件的大小的最大值的和,目前设置为10MB