From f44ff8477fa90fdc64ac2afbf9aa1e35bfd10081 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 16 十二月 2020 12:44:21 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue

---
 ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java |    3 +--
 ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java            |    4 +++-
 ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java             |    4 ++--
 pom.xml                                                                              |    2 +-
 README.md                                                                            |    2 +-
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 95ffef4..56d175f 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@
 * 鏉冮檺璁よ瘉浣跨敤Jwt锛屾敮鎸佸缁堢璁よ瘉绯荤粺銆�
 * 鏀寔鍔犺浇鍔ㄦ�佹潈闄愯彍鍗曪紝澶氭柟寮忚交鏉炬潈闄愭帶鍒躲��
 * 楂樻晥鐜囧紑鍙戯紝浣跨敤浠g爜鐢熸垚鍣ㄥ彲浠ヤ竴閿敓鎴愬墠鍚庣浠g爜銆�
-* 鎻愪緵浜嗕竴涓狾racle鐗堟湰[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle)锛屼繚鎸佸悓姝ユ洿鏂般��
+* 鎻愪緵浜嗗崟搴旂敤鐗堟湰[RuoYi-Vue-fast](https://github.com/yangzongzhuan/RuoYi-Vue-fast)锛孫racle鐗堟湰[RuoYi-Vue-Oracle](https://github.com/yangzongzhuan/RuoYi-Vue-Oracle)锛屼繚鎸佸悓姝ユ洿鏂般��
 * 涓嶅垎绂荤増鏈紝璇风Щ姝RuoYi](https://gitee.com/y_project/RuoYi)锛屽井鏈嶅姟鐗堟湰锛岃绉绘[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
 
 ## 鍐呯疆鍔熻兘
diff --git a/pom.xml b/pom.xml
index d8411e4..0933d5d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,7 +43,7 @@
             <dependency>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-dependencies</artifactId>
-                <version>2.1.18.RELEASE</version>
+                <version>2.2.12.RELEASE</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java b/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java
index 15a6804..3698c75 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java
@@ -29,8 +29,8 @@
             throws IOException, ServletException
     {
         ServletRequest requestWrapper = null;
-        if (request instanceof HttpServletRequest && StringUtils.equalsAnyIgnoreCase(request.getContentType(),
-                MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_JSON_UTF8_VALUE))
+        if (request instanceof HttpServletRequest
+                && StringUtils.equalsAnyIgnoreCase(request.getContentType(), MediaType.APPLICATION_JSON_VALUE))
         {
             requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response);
         }
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java b/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
index 17bfec1..3c9efb2 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
@@ -99,7 +99,6 @@
     public boolean isJsonRequest()
     {
         String header = super.getHeader(HttpHeaders.CONTENT_TYPE);
-        return MediaType.APPLICATION_JSON_VALUE.equalsIgnoreCase(header)
-                || MediaType.APPLICATION_JSON_UTF8_VALUE.equalsIgnoreCase(header);
+        return MediaType.APPLICATION_JSON_VALUE.equalsIgnoreCase(header);
     }
 }
\ No newline at end of file
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
index 8eb4fb2..a65626a 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
@@ -8,8 +8,10 @@
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.serializer.StringRedisSerializer;
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
 import com.fasterxml.jackson.annotation.PropertyAccessor;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator;
 
 /**
  * redis閰嶇疆
@@ -31,7 +33,7 @@
 
         ObjectMapper mapper = new ObjectMapper();
         mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
-        mapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
+        mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY);
         serializer.setObjectMapper(mapper);
 
         template.setValueSerializer(serializer);

--
Gitblit v1.9.3