My APP will send a String time parameter to background, like "13/03/2014", if I used TimeStamp in form bean, My ajax request will raise a 400 error, if I used String in form bean, the request will raise smoothly, but I should convert this parameter into TimeStamp, it is not good I think, So I want to know if there is a converter or configuration for such situation?

有帮助吗?

解决方案

Yes, you should use WebDataBinder.registerCustomEditor method within @InitBinder method.

Here is an example.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top