需要使用自定义的ContentHandler格式化json中的时间类型为指定模式。

在struts.xml中增加了自定义的ContentHandler,但不会生效。

http://blog.csdn.net/shendeguang/article/details/8551404博客中提到了,

在struts.properties文件中,可以做如下配置:

struts.rest.handlerOverride.xml=myXml

于是增加struts.properties文件,并且增加如下配置

struts.rest.handlerOverride.json=myJsonHandler

使得自定义的ContentTypeHandler生效了。

相关文章:

  • 2021-08-27
  • 2021-07-06
  • 2021-06-28
  • 2021-07-27
  • 2021-11-04
  • 2021-08-29
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2021-06-06
  • 2021-12-21
  • 2022-12-23
  • 2021-04-22
相关资源
相似解决方案