From 36e855602d28d05cedd3fd7d51357cb290318316 Mon Sep 17 00:00:00 2001 From: User_cyk <1020691186@qq.com> Date: Sun, 2 Jul 2023 14:00:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/servlet/countNumServlet.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/com/hellogithub/servlet/countNumServlet.java b/src/com/hellogithub/servlet/countNumServlet.java index 3bd5db4..6f3db84 100644 --- a/src/com/hellogithub/servlet/countNumServlet.java +++ b/src/com/hellogithub/servlet/countNumServlet.java @@ -40,9 +40,7 @@ public class countNumServlet extends HttpServlet { resp.setContentType("application/json;charset=UTF-8"); PrintWriter writer = resp.getWriter(); - String str= String.valueOf(projectService.countAll()); - String jsonString = JSONObject.toJSONString(str); - writer.println(jsonString); + writer.println(projectService.countAll()); writer.close(); }