今天在运行一个maven工程时,总是报数据库错误,错误代码如下:
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
数据库url为:
<property name="url" value="jdbc:mysql://localhost:3306/study_mybatis?useSSL=true&useUnicode=true&characterEncoding=utf-8"/>
解决办法:
将 useSSL=true改为false,问题解决,具体为什么这样还没搞清楚。