首页 > 代码库 > Table configuration with catalog null, schema null错误的一个原因

Table configuration with catalog null, schema null错误的一个原因

我在进行Mybatis调试时出现了下面的警告提示:

Generation Warnings Occured
  Table configuration with catalog null, schema null, and table 表名 did not resolve to any tables
  Mybatis generator操作没有产生结果。

多处找资料发现在我的

generatorConfig.xml文件中:

 <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:Mysql://localhost:3306/" userId="用户名" password="密码" />

换成这样就行了:

<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:Mysql://localhost:3306/库名子?characterEncoding=utf8" userId="用户名" password="密码" />

也许对大家有帮助。

Table configuration with catalog null, schema null错误的一个原因