今天配置mybatis的时候,遇到一个很粗心的错误,找了很久才找出来
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### The error may exist in com.easy/mapping/userMapper.xml
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource com.easy/mapping/userMapper.xml
解决方法:把conf.xml文件下的<mapper>里的 resource="com.easy.mapping.userMapper.xml" 改为 resource="com/easy/mapping/userMapper.xml"