http://my.oschina.net/u/202293/blog/375578 html
http://blog.csdn.net/edward9145/article/details/18700415 java
http://www.micmiu.com/j2ee/spring/springmvc-jsonserialize-date/ spring
http://java.dzone.com/articles/how-serialize-javautildate 数据库
http://www.blogjava.net/crazycy/archive/2014/07/15/415839.html json
其实在返回实体类的时候,这样是可行的,可是为了方便简化起见,直接将数据库内的内容以Map形式返回,更简便mvc
因此只要断定一下返回的类型是不是TimeStamp,将TimeStamp,toString()一下,这个问题就解决了...困扰了我很久.net
这也说明一个问题,要找到问题的根源,这个问题就容易解决了.code
/** * 为了不 : java.util.ConcurrentModificationException * * @param map * @return */ @SuppressWarnings({ "rawtypes", "unchecked" }) public static Map<String, Object> Convert2LowerCase(Map<String, Object> map) { HashMap<String, Object> map1 = new HashMap<String, Object>(); Iterator iter = map.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Entry) iter.next(); String key = ((String) entry.getKey()).toLowerCase(); Object value = null; if(entry.getValue() instanceof Timestamp) value = entry.getValue().toString(); else value = entry.getValue(); map1.put(key, value); } return map1; }