Mybatis生成类 UserKey 和 UserWithBlobs

UserKey 和 UserWithBlobs
对于 MySQL 数据库,在生成 User 实体类时,还会同时生成 Userkey 和 UserWithBlobs 实体类,原因在于 MySQL 不支持 catalogs 和 schema。在 MySQL 8.0 以上的版本中,在生成 User 表的实体类时,Mybatis Generator 会找到多张 User 表,包括 MySQL information schemas 中的多张 User 表,生成了多个 User 相关的实体类。
要保证只生成自己指定的 database 中的 User 表,首先要在 中的 connectionURL 中指定数据库的实例名,然后在 中添加相关配置信息,即 <property name="nullCatalogMeansCurrent" value="true"/>,即可保证只生成自己需要的 User 类。
参考

原文地址:https://www.cnblogs.com/ZCWang/p/12507481.html