今天第一次接触Mybatis,本人是跟着狂神的视频学习的,因为我觉得他讲的挺细的
跟着视频先理清思路,然后再自己试着敲,结果报错了。
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet successfully received from the server was 1,124 milliseconds ago. The last packet sent successfully to the server was 1,111 milliseconds ago.
### The error may exist in com/qjf/dao/UserMapper.xml
### The error may involve com.qjf.dao.UserDao.getUserList
### The error occurred while executing a query
### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
那真的是百思不得,以为是自己的问题,然后看着视频检查,花了我好久好久。我知道肯定是跟数据库有关,然后就仔细看mybatis-config.xml里面。结果还是一无所获,那是一个绝望呀
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-con