mybatis generator 设置table schema无效

  使用mybatis generator插件生产代码时,如果数据库是MySQL 8.x  自定义的表与系统表有同名时,会自动生产两张表的对应代码,而且会有很多冲突和错误,此时设置table的schema也没有效果,需要在连接节点里面添加 属性:
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
            connectionURL="jdbc:mysql://localhost:3306/***" userId="root"
            password="****" >
             <property name="nullCatalogMeansCurrent" value="true" />
             </jdbcConnection>
参见mybatis generator issue  http://www.mybatis.org/generator/usage/mysql.html

猜你喜欢

转载自blog.csdn.net/hello_jiangdong/article/details/81512468