1.异常:
java.lang.ClassCastException: class java.time.LocalDateTime cannot be cast to class java.util.Date (java.time.LocalDateTime and java.util.Date are in module java.base of loader 'bootstrap') at com.xxx.model.base.BaseSlOrder.getTransTime(BaseSlOrder.java:804) at com.xxx.service.impl.SlOrderServiceImpl.getAssignableOrders(SlOrderServiceImpl.java:871) at com.xxx.service.impl.SlOrderServiceImpl$$EnhancerByCGLIB$$271a0743.CGLIB$getAssignableOrders$40() at com.xxx.service.impl.SlOrderServiceImpl$$EnhancerByCGLIB$$271a0743$$FastClassByCGLIB$$dcf070a4.invoke() at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at io.jboot.aop.cglib.JbootCglibCallback.lambda$intercept$0(JbootCglibCallback.java:64) at com.jfinal.aop.Invocation.invoke(Invocation.java:101) at io.jboot.aop.cglib.JbootCglibCallback.intercept(JbootCglibCallback.java:66) at com.abitware.service.impl.SlOrderServiceImpl$$EnhancerByCGLIB$$271a0743.getAssignableOrders() at com.abitware.controller.manage.ManageOrderController.alloc(ManageOrderController.java:269) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2.数据库字段类型:
`trans_time` datetime DEFAULT NULL COMMENT '交易发生时间',
3.生成的Model:
public java.util.Date getTransTime() { return get("trans_time"); } public M setTransTime(java.util.Date transTime) { set("trans_time", transTime); return (M)this; }
4.引用的MySql版本:
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.23</version> </dependency>
项目:JFinal