错误如下:
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server
把下面红色框的内容全部注释掉

如下(此图打码了一部分,望理解):
因为打包的时候 ,默认去执行test包下的test示例,可是里面连接服务器的数据库的话,会导致打包失败,只需要把测试注释掉就可以了

543

被折叠的 条评论
为什么被折叠?



