struts2 输出json中 日期出现:2013-12-17T15:57:47 错误格式的数据

原因:struts2 json插件对日期的格式化有问题

解决方法:在实体类的日期的get方法上加注解:@JSON(format="yy-MM-dd HH:mm:ss")

 

 

 

例如:

    @JSON(format = "yy-MM-dd HH:mm:ss")
    public Date getFindtime() {
        return findtime;
    }

 

相关文章: