问答详情
源自:2-2 Guns代码生成演示

字段有日期类型的,输入2018-8-8插入不进去

Field error in object 'customer' on field 'buyDate': rejected value []; codes [typeMismatch.customer.buyDate,typeMismatch.buyDate,typeMismatch.java.util.Date,typeMismatch]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [customer.buyDate,buyDate]; arguments []; default message [buyDate]]; default message [Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'buyDate'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@com.baomidou.mybatisplus.annotations.TableField java.util.Date] for value ''; nested exception is java.lang.IllegalArgumentException]


提问者:xiaoshuai 2018-02-25 18:03

个回答

  • Allen
    2018-02-26 12:08:46

    楼上回答是对的, 建议还是使用课上用的日期控件,手书很麻烦

  • 子凌3659484
    2018-02-26 11:28:44

    输入不全,要包括时分秒。

    输入的格式也可能不对,月份与日期都要两位数字,一位用0补全