sqlite-jdbc版本导致插入数据自增id问题

发布时间 2024-01-04 11:29:16作者: 麒麟正青春

1、问题如下图,

sqlite-jdbc3.44.1.0版本与mybatisplus设置自增id主键问题,使用sqlite-jdbc3.42.0.0即可解决

 

Exception in thread "JavaFX Application Thread" org.springframework.dao.InvalidDataAccessApiUsageException: Error getting generated key or setting result to parameter object.

Cause: java.sql.SQLFeatureNotSupportedException: not implemented by SQLite JDBC driver
; not implemented by SQLite JDBC driver; nested exception is java.sql.SQLFeatureNotSupportedException: not implemented by SQLite JDBC driver

pom文件修改依赖为

<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<!-- <version>3.44.1.0</version>-->
<version>3.42.0.0</version>
</dependency>
程序执行插入数据成功。