The self-growing primary key cannot be obtained when SpringBoot+Mybatis+MySQL is inserted

useGeneratedKeys= "true" keyProperty= "id",

   
the primary key is also printed, but it cannot be obtained

.
Apr.01,2021

your primary key is not self-increasing. Set the primary key to grow in your table, or make a unified judgment before inserting. When the primary key is null, set a serialized id


.

personally tested, this is sure to work. Or if you have mistakes in other places, check it out.

Has the problem of

been solved?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b39d5c-40751.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b39d5c-40751.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?