I am from the database query time to come out of the interface is the millisecond value, after the search was originally because using rest with Jason to parse, by default it will be converted to a long type format
know the problem, the solution is simple, I created a new Jsondateserializer to let it inherit Jsonserializer, as follows
Import Java.util.date;import Org.codehaus.jackson.jsongenerator;import Org.codehaus.jackson.jsonprocessingexception;import Org.codehaus.jackson.map.jsonserializer;import Org.codehaus.jackson.map.serializerprovider;public class Jsondateserializer extends jsonserializer<date>{@ overridepublic void serialize (date date, Jsongenerator JG, Serializerprovider sp) throws IOException, jsonprocessingexception {jg.writestring (BaseUtil.sdf.format (date));}}
This solves the problem:
Resolving Springmvc Date Type serialization