Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
6cf2a8ed
Commit
6cf2a8ed
authored
Dec 16, 2020
by
RuoYi
Browse files
升级SpringBoot到最新版本2.2.12 提升启动速度
parent
67198aed
Changes
4
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
6cf2a8ed
...
...
@@ -41,7 +41,7 @@
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
2.
1
.1
8
.RELEASE
</version>
<version>
2.
2
.1
2
.RELEASE
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
...
...
ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java
View file @
6cf2a8ed
...
...
@@ -29,8 +29,8 @@ public class RepeatableFilter implements Filter
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
);
}
...
...
ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java
View file @
6cf2a8ed
...
...
@@ -99,7 +99,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper
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
ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java
View file @
6cf2a8ed
...
...
@@ -8,8 +8,10 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
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 @@ public class RedisConfig extends CachingConfigurerSupport
ObjectMapper
mapper
=
new
ObjectMapper
();
mapper
.
setVisibility
(
PropertyAccessor
.
ALL
,
JsonAutoDetect
.
Visibility
.
ANY
);
mapper
.
enabl
eDefaultTyping
(
ObjectMapper
.
DefaultTyping
.
NON_FINAL
);
mapper
.
activat
eDefaultTyping
(
LaissezFaireSubTypeValidator
.
instance
,
ObjectMapper
.
DefaultTyping
.
NON_FINAL
,
JsonTypeInfo
.
As
.
PROPERTY
);
serializer
.
setObjectMapper
(
mapper
);
template
.
setValueSerializer
(
serializer
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment