message [Failed to convert property value of type [java.lang.String] to required type [java.util.Dat

Posted 学习笔记

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了message [Failed to convert property value of type [java.lang.String] to required type [java.util.Dat相关的知识,希望对你有一定的参考价值。

springmvc前台字符串,后台Date类型字段。时间强转失败

数值:18年12月31日 15:43:21

解决方法,给时间字段加注释

 @DateTimeFormat(pattern = "yy年MM月dd日 HH:mm:ss")
  private Date f_createtime;

 

以上是关于message [Failed to convert property value of type [java.lang.String] to required type [java.util.Dat的主要内容,如果未能解决你的问题,请参考以下文章