使用Mybatis Generator时遇到“Exception getting JDBC Driver”?

error description:
Mybatis属于半自动ORM, 由于手动书写Mapping的映射文件很容易出错,我们可以利用Mybatis-Generator来帮我们自动生成文件。在eclipse中使用过Mybatis Generator过的小伙伴可能在右击其配置文件然后Run Mybatis Generator时候遇到过如下的问题:

使用Mybatis Generator时遇到“Exception getting JDBC Driver”?

quick solution

使用Mybatis Generator时遇到“Exception getting JDBC Driver”?

在下图中添加对应的项目以及对应的jdbc.Driver
使用Mybatis Generator时遇到“Exception getting JDBC Driver”?

使用Mybatis Generator时遇到“Exception getting JDBC Driver”?

然后点击run,和数据库中对应表生成的pojo和mapper文件就会乖乖进入到您的项目中啦~