Mybatis报错:
org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for test.findUserById
Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for test.findUserById
将
<mappers>
<mapper resource="com.mybatis.mapper.UserMapper.xml" />
</mappers>
改成<mappers> <mapper resource="com/mybatis/mapper/UserMapper.xml" /> </mappers>