org.springframework.util.SerializationUtils
Map<String, String> map = Maps.newHashMap(); map.put("a", "1"); map.put("b", "2"); map.put("c", "3"); byte[] serialize = SerializationUtils.serialize(map); Object deserialize = SerializationUtils.deserialize(serialize); System.out.println(deserialize);