java控制台报错:
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@2cc03c1 – Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 0 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
解决办法:
在数据库的url里面加上useSSL=false(这里一定要设置成false,否则会报错)
jdbc:mysql://192.168.112.128:3306/cakeshop?useUnicode=true&characterEncoding=UTF-8&verifyServerCertificate=false&useSSL=false