首页 > 移动平台 > 详细

MyBatis自动加载Mapper文件报错 Exception getting JDBC Driver

时间:2021-01-11 18:25:37      阅读:36      评论:0      收藏:0      [点我收藏+]

报错内容:

Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7:generate (default-cli) on project OrderFood: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7:generate failed: Exception getting JDBC Driver

具体如下图:

技术分享图片

解决办法:

在pom.xml文件mybatis的build 打包配置中加上数据库的配置:

 1 <plugin>
 2                 <groupId>org.mybatis.generator</groupId>
 3                 <artifactId>mybatis-generator-maven-plugin</artifactId>
 4                 <version>1.3.7</version>
 5                   <dependencies>
 6                       <dependency>
 7                           <groupId>mysql</groupId>
 8                           <artifactId>mysql-connector-java</artifactId>
 9                           <version>5.1.46</version>
10                       </dependency>
11                   </dependencies>
12                 <configuration>
13                     <configurationFile>${basedir}/src/main/resources/generator/generatorConfig.xml</configurationFile>
14                     <overwrite>true</overwrite>
15                     <verbose>true</verbose>
16                 </configuration>
17 
18 </plugin>

 

参考文档地址:

https://blog.csdn.net/shasiqq/article/details/88807099

MyBatis自动加载Mapper文件报错 Exception getting JDBC Driver

原文:https://www.cnblogs.com/xuchen163/p/14263152.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!