Mybatis query error: Exception in thread “main” org.apache.ibatis.exceptions.PersistenceException…

1. Error Messages:
Mapped Statements collection does not contain value for com.lsy.mapper.UsersMapper.selectUsersAll

Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.lsy.mapper.UsersMapper.selectUsersAll
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.lsy.mapper.UsersMapper.selectUsersAll

One of the reasons:
mapper namespace writes the wrong file name:


usersmapper in mapper.xml file is written as usermapper

The correct wording is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lsy.mapper.UsersMapper">
    <select id="selectUsersAll" resultType="com.lsy.pojo.Users">
        select * from users
    </select>
</mapper>

Read More: