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
Eladmin
Commits
c6f579b1
Commit
c6f579b1
authored
Jul 07, 2023
by
Zheng Jie
Browse files
代码优化
parent
0f3578c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-common/src/main/java/me/zhengjie/config/RedisConfig.java
View file @
c6f579b1
...
...
@@ -127,6 +127,7 @@ public class RedisConfig extends CachingConfigurerSupport {
@Bean
@Override
@SuppressWarnings
({
"all"
})
public
CacheErrorHandler
errorHandler
()
{
// 异常处理,当Redis发生异常时,打印日志,但是程序正常走
log
.
info
(
"初始化 -> [{}]"
,
"Redis CacheErrorHandler"
);
...
...
@@ -152,7 +153,6 @@ public class RedisConfig extends CachingConfigurerSupport {
}
};
}
}
/**
...
...
@@ -161,7 +161,7 @@ public class RedisConfig extends CachingConfigurerSupport {
* @author /
* @param <T>
*/
class
FastJsonRedisSerializer
<
T
>
implements
RedisSerializer
<
T
>
{
class
FastJsonRedisSerializer
<
T
>
implements
RedisSerializer
<
T
>
{
private
final
Class
<
T
>
clazz
;
...
...
@@ -180,7 +180,7 @@ public class RedisConfig extends CachingConfigurerSupport {
@Override
public
T
deserialize
(
byte
[]
bytes
)
{
if
(
bytes
==
null
||
bytes
.
length
<
=
0
)
{
if
(
bytes
==
null
||
bytes
.
length
=
=
0
)
{
return
null
;
}
String
str
=
new
String
(
bytes
,
StandardCharsets
.
UTF_8
);
...
...
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