【fix sonar】DataSourceCachePool文件
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ public class DataSourceCachePool {
|
|||||||
*/
|
*/
|
||||||
public static DynamicDataSourceModel getCacheDynamicDataSourceModel(String dbKey) {
|
public static DynamicDataSourceModel getCacheDynamicDataSourceModel(String dbKey) {
|
||||||
String redisCacheKey = CacheConstant.SYS_DYNAMICDB_CACHE + 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);
|
return (DynamicDataSourceModel) getRedisTemplate().opsForValue().get(redisCacheKey);
|
||||||
}
|
}
|
||||||
CommonAPI commonAPI = SpringContextUtils.getBean(CommonAPI.class);
|
CommonAPI commonAPI = SpringContextUtils.getBean(CommonAPI.class);
|
||||||
|
|||||||
Reference in New Issue
Block a user