Error creating bean with name ‘dataSource‘ defined in class path resource...

报错信息

Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsEx

解决方案 

检查配置文件 application.propertice 或者 application.yml 文件里面配置数据库信息;

我的问题出在 mysql 的 url:端口号写错了。

完。。。 

猜你喜欢

转载自blog.csdn.net/weixin_62332711/article/details/126897260