json集合中转换时间Date格式

JsonConfig config = new JsonConfig();
config.registerJsonValueProcessor(Date.class, new DateJsonValueProcessor("yyyy-MM-dd hh:mm"));
dataMessage = JSONObject.fromObject(user, config);

猜你喜欢

转载自blog.csdn.net/qq_34468174/article/details/79614009