资源缓存key规则调整

yun-zuoyi
汪云昊 5 years ago
parent 5f9399ad88
commit db19be9c3e

@ -42,7 +42,7 @@ public class AppStartSystemInit implements CommandLineRunner {
// 限制账号数量 // 限制账号数量
public static int userInfoCount = 100; public static int userInfoCount = 100;
@Value("${" + CommonConstWords.PROP_IMPP_ELASTICSEARCH_URL + "}") // @Value("${" + CommonConstWords.PROP_IMPP_ELASTICSEARCH_URL + "}")
public String PROP_IMPP_ELASTICSEARCH_URL; public String PROP_IMPP_ELASTICSEARCH_URL;
@Resource(name = CommonConstWords.IMPP_REDIS_RES) @Resource(name = CommonConstWords.IMPP_REDIS_RES)

@ -232,12 +232,11 @@ public class SystemInitService implements ISystemInitService {
resListPage = systemResourceService.listSysLocaleResourceByPager(null, pager); resListPage = systemResourceService.listSysLocaleResourceByPager(null, pager);
for (SysLocaleResource res : resListPage.getObjectList()) { for (SysLocaleResource res : resListPage.getObjectList()) {
resKey = CommonConstWords.REDIS_PREFIX_CACHE_LANGUAGE + ":" + res.getLanguageCode() + ":" + res.getSoftType(); resKey = CommonConstWords.REDIS_PREFIX_CACHE_LANGUAGE + ":" + res.getSoftType() + ":" + res.getResourceKey();
resMap = langSoftMap.computeIfAbsent(resKey, k -> new HashMap<>()); resMap = langSoftMap.computeIfAbsent(resKey, k -> new HashMap<>());
resMap.put(res.getResourceKey(), res.getResourceValue()); resMap.put(res.getResourceKey(), res.getResourceValue());
} }
LOGGER.info("【加载资源】数据分类中 {} / {} ", pager.getEndRow(), pager.getTotalRows()); LOGGER.info("【加载资源】数据分类中 {} / {} ", pager.getEndRow(), pager.getTotalRows());
} while (pager.hasNext()); } while (pager.hasNext());

Loading…
Cancel
Save