最近这个bug困扰了我两天,上网一直找不到答案,一直提示我没有合适的驱动去加载,起初我还以为是不是我的数据库版本太高了,要不要考虑换个低一点的版本。报错具体如下:
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/mybatis?serverTimezone=UTC&characterEncoding=utf-8
### The error may exist in com/Dao/UserDao.xml
### The error may involve com.Dao.UserDao.findAll
### The error occurred while executing a query
### Cause: java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/mybatis?serverTimezone=UTC&characterEncoding=utf-8
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at org.apache