src/main/java/com/newvideo/service/imp/ConfigService.java
@@ -43,6 +43,14 @@ } return map; } @Cacheable(value = "homeCache", key = "'getConfigByKey-'+#key") public Config getConfigByKeyCache(String key) { List<Config> list = configDao.list("from Config cf where cf.key=?", new Serializable[] { key }); if (list != null && list.size() > 0) return list.get(0); else return null; } public Config getConfigByKey(String key) { List<Config> list = configDao.list("from Config cf where cf.key=?", new Serializable[] { key });