在Eclipse中使用Mybatis Generator遇到的错误:
java.lang.RuntimeException: Cannot instantiate object of type mybatis.PaginationPlugin
这个是因为在我的generatorConfig.xml配置文件中我加了一条
< plugin type = "mybatis.PaginationPlugin" />
导致报错,删除即可
2. 在运行生成Model等文件时,数据库里其他schema下的表也被生成了,所以是schema设置了没有起到作用,后来查询发现,是MySQL的话需要在 < jdbcConnection > 设置里加一条
< property name = "nullCatalogMeansCurrent" value = "true" />
加上之后运行,就成功了
参考地址: http://www.mybatis.org/generator/usage/mysql.html
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10314474/viewspace-2200340/ ,如需转载,请注明出处,否则将追究法律责任。