From 6ca7870393b0be1e9088bf9e0d5bd1e68901e689 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 30 Mar 2021 15:30:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/filter/RepeatedlyRequestWrapper.java | 14 ++++++-------- .../java/com/ruoyi/common/utils/StringUtils.java | 2 +- .../com/ruoyi/common/utils/html/EscapeUtil.java | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java b/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java index 0c011e2..caacba6 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java @@ -38,18 +38,21 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper @Override public ServletInputStream getInputStream() throws IOException { - final ByteArrayInputStream bais = new ByteArrayInputStream(body); - return new ServletInputStream() { - @Override public int read() throws IOException { return bais.read(); } + @Override + public int available() throws IOException + { + return body.length; + } + @Override public boolean isFinished() { @@ -67,11 +70,6 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper { } - - @Override - public int available() throws IOException { - return body.length; - } }; } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java index 36b3e09..1f0d072 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java @@ -312,7 +312,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils } /** - * 下划线转驼峰命名 + * 驼峰转下划线命名 */ public static String toUnderScoreCase(String str) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java index 121681b..65fd792 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java @@ -22,7 +22,7 @@ public class EscapeUtil // special HTML characters TEXT['\''] = "'".toCharArray(); // 单引号 - TEXT['"'] = """.toCharArray(); // 单引号 + TEXT['"'] = """.toCharArray(); // 双引号 TEXT['&'] = "&".toCharArray(); // &符 TEXT['<'] = "<".toCharArray(); // 小于号 TEXT['>'] = ">".toCharArray(); // 大于号