为了账号安全,请及时绑定邮箱和手机立即绑定

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

[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 回答

http://img1.sycdn.imooc.com//5fcdcdb6000146d010300450.jpg

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

0 回复 有任何疑惑可以回复我~
#1

weixin_慕姐9030210

老哥我也出现这个问题
2021-07-09 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
SpringBoot构建电商基础秒杀项目
  • 参与学习       49064    人
  • 解答问题       954    个

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

进入课程

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

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信