mysql数据库,mybatis的xml中,insert添加
useGeneratedKeys="true"keyProperty="id"
插入数据时,报错:
Cause: java.sql.SQLException: Field 'ID' doesn't have a default value
; ]; Field 'ID' doesn't have a default value; nested exception is java.sql.SQLException: Field 'ID' doesn't have a default value
数据库没设置自增,添加这个也没用