1.
public Map<String, List<CellInfo1>>getSceneCoverCellForRedis(){ Jedis jedis = null; Map<String, List<CellInfo1>> cellMap= null; try{ jedis =jedisPool.getResource(); String jsonStr=jedis.get(DbKeys.WB_COVERAREA_4); Type type = new TypeToken<Map<String,List<CellInfo1>>>() {}.getType(); Gson gson = newGson(); cellMap=gson.fromJson(jsonStr,type); jedis.close(); jedis= null; } catch(Exception e) { if(jedis != null){ jedis.close(); } e.printStackTrace(); } returncellMap; }
2.
public class DbKeys {
......
public final static String WB_COVERAREA_4="wb_coverarea_4";
}