代码优化
This commit is contained in:
parent
e9d47a744d
commit
2572c1600c
@ -123,6 +123,7 @@ public class RedisConfig extends CachingConfigurerSupport {
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public CacheErrorHandler errorHandler() {
|
||||
// 异常处理,当Redis发生异常时,打印日志,但是程序正常走
|
||||
log.info("初始化 -> [{}]", "Redis CacheErrorHandler");
|
||||
@ -176,7 +177,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);
|
||||
|
Loading…
Reference in New Issue
Block a user