Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cocktail-party-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cocktail-party
cocktail-party-server
Commits
6cf2a8ed
提交
6cf2a8ed
authored
12月 16, 2020
作者:
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
升级SpringBoot到最新版本2.2.12 提升启动速度
上级
67198aed
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
8 行增加
和
6 行删除
+8
-6
pom.xml
pom.xml
+1
-1
RepeatableFilter.java
...c/main/java/com/ruoyi/common/filter/RepeatableFilter.java
+2
-2
XssHttpServletRequestWrapper.java
...com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
+2
-2
RedisConfig.java
...src/main/java/com/ruoyi/framework/config/RedisConfig.java
+3
-1
没有找到文件。
pom.xml
浏览文件 @
6cf2a8ed
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
2.
1.18
.RELEASE
</version>
<version>
2.
2.12
.RELEASE
</version>
<type>
pom
</type>
<type>
pom
</type>
<scope>
import
</scope>
<scope>
import
</scope>
</dependency>
</dependency>
...
...
ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java
浏览文件 @
6cf2a8ed
...
@@ -29,8 +29,8 @@ public class RepeatableFilter implements Filter
...
@@ -29,8 +29,8 @@ public class RepeatableFilter implements Filter
throws
IOException
,
ServletException
throws
IOException
,
ServletException
{
{
ServletRequest
requestWrapper
=
null
;
ServletRequest
requestWrapper
=
null
;
if
(
request
instanceof
HttpServletRequest
&&
StringUtils
.
equalsAnyIgnoreCase
(
request
.
getContentType
(),
if
(
request
instanceof
HttpServletRequest
MediaType
.
APPLICATION_JSON_VALUE
,
MediaType
.
APPLICATION_JSON_UTF8
_VALUE
))
&&
StringUtils
.
equalsAnyIgnoreCase
(
request
.
getContentType
(),
MediaType
.
APPLICATION_JSON
_VALUE
))
{
{
requestWrapper
=
new
RepeatedlyRequestWrapper
((
HttpServletRequest
)
request
,
response
);
requestWrapper
=
new
RepeatedlyRequestWrapper
((
HttpServletRequest
)
request
,
response
);
}
}
...
...
ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
浏览文件 @
6cf2a8ed
...
@@ -99,7 +99,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
...
@@ -99,7 +99,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
public
boolean
isJsonRequest
()
public
boolean
isJsonRequest
()
{
{
String
header
=
super
.
getHeader
(
HttpHeaders
.
CONTENT_TYPE
);
String
header
=
super
.
getHeader
(
HttpHeaders
.
CONTENT_TYPE
);
return
MediaType
.
APPLICATION_JSON_VALUE
.
equalsIgnoreCase
(
header
)
return
MediaType
.
APPLICATION_JSON_VALUE
.
equalsIgnoreCase
(
header
);
||
MediaType
.
APPLICATION_JSON_UTF8_VALUE
.
equalsIgnoreCase
(
header
);
}
}
}
}
\ No newline at end of file
ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
浏览文件 @
6cf2a8ed
...
@@ -8,8 +8,10 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
...
@@ -8,8 +8,10 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
import
com.fasterxml.jackson.annotation.JsonAutoDetect
;
import
com.fasterxml.jackson.annotation.JsonAutoDetect
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.PropertyAccessor
;
import
com.fasterxml.jackson.annotation.PropertyAccessor
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator
;
/**
/**
* redis配置
* redis配置
...
@@ -31,7 +33,7 @@ public class RedisConfig extends CachingConfigurerSupport
...
@@ -31,7 +33,7 @@ public class RedisConfig extends CachingConfigurerSupport
ObjectMapper
mapper
=
new
ObjectMapper
();
ObjectMapper
mapper
=
new
ObjectMapper
();
mapper
.
setVisibility
(
PropertyAccessor
.
ALL
,
JsonAutoDetect
.
Visibility
.
ANY
);
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
);
serializer
.
setObjectMapper
(
mapper
);
template
.
setValueSerializer
(
serializer
);
template
.
setValueSerializer
(
serializer
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论