关于mybait-generator生成的报错

来源:5-9 mybatis三剑客之mybatis-generator配置

晨澄元

2019-06-30

[INFO] Scanning for projects...

[WARNING] 

[WARNING] Some problems were encountered while building the effective model for com:mmall:war:1.0-SNAPSHOT

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 266, column 15

[WARNING] 

[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

[WARNING] 

[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

[WARNING] 

[INFO] 

[INFO] -----------------------------< com:mmall >------------------------------

[INFO] Building mmall Maven Webapp 1.0-SNAPSHOT

[INFO] --------------------------------[ war ]---------------------------------

[INFO] 

[INFO] --- mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ mmall ---

[INFO] Connecting to the Database

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:  0.437 s

[INFO] Finished at: 2019-06-30T03:39:34+08:00

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Exception getting JDBC Driver: com.mysql.jdbc.Driver -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException


Process finished with exit code 1


写回答

1回答

九局下半上衫达也

2019-06-30

https://git.imooc.com/coding-96/coding-96/src/master/src/main/tools  这个网址下载那个mysql jar包 

//img.mukewang.com/szimg/5d17da4e00016e3311100272.jpg

然后放在你电脑一个最好是非中文目录, 把文件路径复制在datasource.properties中即可,比如我的db.driverLocation=D:\\mmall\\mysql-connector-java-5.1.6-bin.jar

windows下目录分隔貌似是用\且需要转义, 我也是试出来的。

//img.mukewang.com/szimg/5d17daeb0001732c05960110.jpg

1
3
SilentJhin
win7下要转义,九局下半上衫达也同学写的对
2019-07-03
共3条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程