在使用JPA时,
数据库表的日期字段city_date数据类型为 date
数据库表对应类的属性cityDate 类型为Date
使用jpa的方法查询,但是以cityDate的值作为查询条件时,参数类型定义成了String
使用到该方法进行查询时,显示错误
IllegalArgumentException: Parameter value [2021-10-20] did not match expected type [java.util.Date (n/a)]解决
把方法的参数类型从String改成Date类型


![IllegalArgumentException: Parameter value [2021-10-20] did not match expected type [java.util.Date ( IllegalArgumentException: Parameter value [2021-10-20] did not match expected type [java.util.Date (](http://www.mshxw.com/aiimages/31/337374.png)
