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;
    }

 

相关文章:

  • 2022-01-24
  • 2021-12-08
  • 2021-06-10
  • 2022-12-23
猜你喜欢
  • 2021-10-27
  • 2021-12-22
  • 2021-05-20
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
相关资源
相似解决方案