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 = new Gson(); cellMap= gson.fromJson(jsonStr,type); jedis.close(); jedis= null; } catch (Exception e) { if(jedis != null){ jedis.close(); } e.printStackTrace(); } return cellMap; }
2.
public class DbKeys {
......
public final static String WB_COVERAREA_4="wb_coverarea_4";
}