今天就跟大家聊聊有关使用mybatis如何设置禁止生成Example类,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

只需要在配置要生成的table表中添加几个配置属性就行了。
在generatorConfig.xml文件中修改
<!--指定数据库表--> <table tableName="t_user" schema="" > <generatedKey column="userId" sqlStatement="Mysql" identity="true"/> </table> <table tableName="t_scene" schema="" > <generatedKey column="sceneId" sqlStatement="Mysql" identity="true"/> </table>