数据库连接报错怎么办呀,还有警告

来源:2-4 Mybatis自动生成器使用方式

宝慕林8345878

2020-11-30 22:13

[INFO] Scanning for projects...

[WARNING] 

[WARNING] Some problems were encountered while building the effective model for miaoshaproject:miaosha:jar:1.0-SNAPSHOT

[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: mysql:mysql-connector-java:jar -> duplicate declaration of version 5.1.41 @ line 62, column 17

[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] ------------------------------------------------------------------------

[INFO] Building miaosha 1.0-SNAPSHOT

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

[INFO] 

[INFO] --- mybatis-generator-maven-plugin:1.3.5:generate (default-cli) @ miaosha ---

[INFO] Connecting to the Database

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

[INFO] BUILD FAILURE

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

[INFO] Total time: 1.217 s

[INFO] Finished at: 2020-11-30T22:11:35+08:00

[INFO] Final Memory: 24M/307M

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

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project miaosha: Unknown database 'miaosha' -> [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/MojoExecutionException


Process finished with exit code 1


写回答 关注

1回答

  • weixin_慕斯6330653
    2020-12-07 14:38:01

    http://img3.mukewang.com/5fcdcdb6000146d010300450.jpg

    看一下你的mybatis-generator.xml里面,jdbc配置是否正确

    weixin...

    老哥我也出现这个问题

    2021-07-09 21:23:52

    共 1 条回复 >

SpringBoot构建电商基础秒杀项目

应用SpringBoot快速搭建拥有用户、商品、交易及秒杀活动的电商秒杀应用。

49020 学习 · 954 问题

查看课程

相似问题