刚刚使用MyBatis时常常会出现这个错误:
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: Cannot find class: ${jdbc.driver}
### The error may exist in User.xml
### The error may involve test.findUserById
### The error occurred while executing a query
一般这种情况都是 .xml文件或.properties文件中的拼写、遗漏、用户名密码、多加空格等错误。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)