代码优化

pull/805/head
Zheng Jie 2023-07-07 10:41:03 +08:00
parent 0f3578c9be
commit c6f579b126
1 changed files with 3 additions and 3 deletions

View File

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