update方法我传了last_edit_time字段传入了new Date(),但是报错了,更新不了
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_edit_time='2019-02-01 11:07:02.26' WHERE area_id=7' at line 4 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
我看到传入的date多了小数点,于是把小数点去掉后再转成date类型的,发现也不行,也报这个错误,后面的时间是没有小数点的,我数据库的版本是5.7,这个问题怎么解决呢