出现该错误时候,根据错误提示行,检查url地址,发现地址写反了:
url: jdbc:mysql://localhost:3306/mysql?useSSL=false
改完之后,重启服务发现另一个问题
Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
页面展示:
这时候有几点可以检查下:
1.mysql服务端版本和mysql的驱动包(mysql-connector)是否兼容
2.url连接域名地址是否正确
3.mysql服务是否已正常启动
4.是否可以正常扫描到类
把需要的注意的地方改了之后,发现调用成功啦!