![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JPA
qq_44209563
这个作者很懒,什么都没留下…
展开
-
对象序列化成json报错:java.lang.StackOverflowError: null
java.lang.StackOverflowError: null at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.def原创 2022-03-14 09:07:02 · 1264 阅读 · 0 评论 -
jpa根据日期查询某天数据问题
问题项目中有个需求需要用当天日期来查询数据,表中的city_date字段是datetime类型,sql语句查询如下:select * from city_weather where city_date='2021-10-27';因为sql语句中的city_date参数'2021-10-27'是字符串,所以使用jap操作时,也打算使用String类型的参数。jpa的dao层方法使用方法名解析的方式定义方法public interface CityWeatherDao extends JpaRepo原创 2021-10-28 00:08:14 · 3147 阅读 · 0 评论 -
IllegalArgumentException: Parameter value [2021-10-20] did not match expected type [java.util.Date (
问题在使用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)]解决把方法的参数类型从Str原创 2021-10-20 21:50:29 · 2560 阅读 · 0 评论