【fix sonar】DataSourceCachePool文件

This commit is contained in:
梁琦涛
2023-03-09 12:02:07 +08:00
parent 3937e281c4
commit 01b679947c
@@ -38,7 +38,7 @@ public class DataSourceCachePool {
*/
public static DynamicDataSourceModel getCacheDynamicDataSourceModel(String dbKey) {
String redisCacheKey = CacheConstant.SYS_DYNAMICDB_CACHE + dbKey;
if (getRedisTemplate().hasKey(redisCacheKey)) {
if (Boolean.TRUE.equals(getRedisTemplate().hasKey(redisCacheKey))) {
return (DynamicDataSourceModel) getRedisTemplate().opsForValue().get(redisCacheKey);
}
CommonAPI commonAPI = SpringContextUtils.getBean(CommonAPI.class);