mybatis-generator-maven-plugin Access denied for user 'cmsadmin'@'172.16.0.32' (using password: YES

项目中使用mybatis-generator-maven-plugin插件报出一下异常

本来想着生成完mapper文件,就开始一把梭的敲代码,一脸毫无问题的表情看着屏幕,奈何,bug总是对我情有独钟

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.470 s
[INFO] Finished at: 2019-09-23T10:06:29+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.5:generate (default-cli) on project ytcms-web: Access denied for user 'cmsadmin'@'172.16.0.32' (using password: YES) -> [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

看内容说是拒绝访问,网上搜了好多问题,有的要改服务器得数据库权限啥的,都不好使。
后来问了孟学长,大佬就是大佬啊,不到10s钟就看出问题了,说是

“看日志应该是IP配的不对,看下generator配置文件引用的配置文件”
我看了下generator.xml得配置文件引用得jdbc.properties文件,

#jdbc.url=这里得数据库得地址,已经更换,所以运行不对,改成正确得就好了
#jdbc.username=root
#jdbc.password=123456
#jdbc.driver=com.mysql.jdbc.Driver

还有有的报出jdbc找不到,原因是hi

jdbc.driver=com.mysql.jdbc.Driver

中得键jdbc.driver只能是jdbc.driver,而不能是其它得

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值