Вопрос

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