问题:
在使用mybatis-generator:generate生成器时,会生成别的数据库内同表名;
因为是相同表名。
解决:
在生成器的配置文件中的数据库连接地址内添加:
<!--放置生成其他库同名表-->
<property name="nullCatalogMeansCurrent" value="true"/>
<property name="nullCatalogMeansCurrent" value="true"/>
<!-- 数据库链接URL、用户名、密码 --> <jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/数据库名?characterEncoding=utf8" userId="root" password="l23456" > <!--放置生成其他库同名表--> <property name="nullCatalogMeansCurrent" value="true"/> </jdbcConnection>
- 生成器 mybatis-generator generator generate mybatis生成器mybatis-generator generator mybatis 代码生成mybatis-generator generator mybatis mybatis-generator mybatis-generator generator statement实际 mybatis mybatis-generator generator文件 mybatis-generator 202309301820 generator mybatis mybatis-generator generator mybatis sqlite3 mybatis-generator generator插件mybatis mybatis-plus-generator-ui生成器generator 生成器 自动生成generator mybatis