【发布时间】:2016-04-23 11:01:27
【问题描述】:
我们需要在从 jax-rs webservice 返回的 XML 期间以不同的方式格式化日期字段。
例如
Class Dates {
Date date1; //in xml this date must be in format dd-mon-yyyy
Date date2; // in xml this date must be in format dd-mm-yyyy hh:ss sss
}
我们尝试了 XMLAdapter,但我们无法确定它是用于字段 date1 还是 date2
请指教。如果有任何其他过滤器或事件我可以使用
【问题讨论】: