錯誤:
createTime:Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date'
{
"code": -1,
"msg": "参数绑定失败--createTime:Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'createTime'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@javax.persistence.Column @io.swagger.annotations.ApiModelProperty java.util.Date] for value ''; nested exception is java.lang.IllegalArgumentException"
}
解決:
BaseDataInfo.java(model)

xml:
第2行:DTD(Document Type Definition)的標準和,該DTD標準對應的網址,表明用什麽mybatis。DTD Mapper 3.0:这是 MyBatis 3.0 的 Mapper 文件格式
第3行:這個xml文件對應的是哪個Mapper文件
第4行:sql得到的結果封裝到BaseDataInfo中
第5行:<result property="lgtd" jdbcType="NUMERIC" column="lgtd"/>
property="lgtd" :模型BaseDataInfo中的變量
jdbcType="NUMERIC"
column="lgtd":數據庫中的類型和字段屬性的名稱

1万+

被折叠的 条评论
为什么被折叠?



