代码优化

This commit is contained in:
Zheng Jie 2023-07-07 10:41:09 +08:00
parent e9d47a744d
commit 2572c1600c

View File

@ -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);