selectKey和useGeneratedKeys属性

useGeneratedKeys
 (insert and update only) This tells MyBatis to use the JDBC getGeneratedKeys method to retrieve keys generated internally by the database (e.g.auto increment fields in RDBMS like MySQL or SQL Server). Default: false
(( 仅 对 insert 和update有 用 ) 这 会 告 诉 MyBatis 使 用 JDBC 的 getGeneratedKeys 方法来取出由数据(比如:像 MySQL 和 SQL Server 这样的数据库管理系统的自动递增字段)内部生成的主键。默认值:false。)
keyProperty
(insert and update only) Identifies a property into which MyBatis will set the key value returned by
getGeneratedKeys , or by a selectKey child element of the insert statement. Default: unset .
Can be a comma separated list of property names if multiple generated columns are expected.
((仅对 insert和update有用) 标记一个属性, MyBatis会通过 getGeneratedKeys 或者通过 insert 语句的 selectKey 子元素设置它的值。默认: 不设置。)
keyColumn
(insert and update only) Sets the name of the column in the table with a generated key. This is only required
in certain databases (like PostgreSQL) when the key column is not the first column in the table. Can be a
comma separated list of columns names if multiple generated columns are expected.