/** * 使用谷歌Gson实现Json串和Java Bean互转 */ public class JsonHelper { public static String toJson(Object src){ return new Gson().toJson(src); } public static <T> T fromJson(String json, Class<T> clazz) throws Exception { return new Gson().fromJson(js
Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another. Typically, these Java Beans will be of different complex types. 更多内容见:http://dozer.sourceforge.net/documentation/about.html 两个简单示例: map --> bean假设由reque