- 添加joda-time-xxx.jar包。
- 注意,Date类应该用sql里面的,不应该用util里面的。emmm,主要是因为格式的问题。
- 在dispatcher-servlet.xml中配置: mvc:annotation-driven
还有一种方法可以在不使用@DateTImeFormat的情况下实现需求:
https://stackoverflow.com/questions//datetimeformatpattern-yyyy-mm-dd-with-spring-mvc-rest-service-gives-error
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/218013.html原文链接:https://javaforall.net
