sonar代码规范问题修复;

This commit is contained in:
gaoqr
2024-09-14 10:47:03 +08:00
parent 73440a7f3a
commit 59296b19c8
30 changed files with 75 additions and 72 deletions
@@ -1,6 +1,6 @@
package com.cf.imes.framework.redis.config;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.text.StrPool;
import com.cf.imes.framework.redis.core.TimeoutRedisCacheManager;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.cache.CacheProperties;
@@ -44,10 +44,10 @@ public class ChenfengCacheAutoConfiguration {
config = config.computePrefixWith(cacheName -> {
String keyPrefix = cacheProperties.getRedis().getKeyPrefix();
if (StringUtils.hasText(keyPrefix)) {
keyPrefix = keyPrefix.lastIndexOf(StrUtil.COLON) == -1 ? keyPrefix + StrUtil.COLON : keyPrefix;
return keyPrefix + cacheName + StrUtil.COLON;
keyPrefix = keyPrefix.lastIndexOf(StrPool.COLON) == -1 ? keyPrefix + StrPool.COLON : keyPrefix;
return keyPrefix + cacheName + StrPool.COLON;
}
return cacheName + StrUtil.COLON;
return cacheName + StrPool.COLON;
});
// 设置使用 JSON 序列化方式
config = config.serializeValuesWith(