org.springframework.jdbc.CannotGetJdbcConnectionException: PreparedStatementCallback; Could not retr

  在学习SpringCloud Alibaba Nacos时,实现derby到mysql切换报了上述异常,异常原因是因为我的mysql版本是8.0以上的,nacos-server默认支持5版本的,所以不行。网上找了很多解决办法,都是修改源码什么的,下面是我的方法,亲测有效!

1.首先你下载的nacos版本是1.2以上(我的是1.3.0)

2.在你nacos的安装目录新建plugins/mysql文件夹(因为startup.cmd里面默认加载这个目录下的jar包),加入一个8.0+版本的mysql-connector-java...jar

 

3.重启nacos即可。

下面是我分享的mysql8版本的jar包和nacos-server1.3.0

链接:https://pan.baidu.com/s/1mU8erUxCibGANgegyxmxsA 
提取码:aun2

如果报org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure异常的,请看我的这篇博客https://blog.csdn.net/ls_wifi/article/details/107922511

 

posted @ 2020-08-10 21:34  小帅学java  阅读(124)  评论(0)    收藏  举报