The test is failing because the bound statement 'org.example.dao.AdminDao.findAll' is not found in the MyBatis mapper configuration.

To fix this issue, you need to make sure that the MyBatis mapper configuration file (usually named 'mapper.xml') includes a statement with the id 'findAll' for the AdminDao interface.

Here's an example of how the mapper configuration file should look like:

<!-- mapper.xml -->
<mapper namespace="org.example.dao.AdminDao">
    <select id="findAll" resultType="org.example.model.Admin">
        SELECT * FROM admin_table
    </select>
</mapper>

Make sure that the <mapper> element has the correct namespace attribute value that matches the package and interface name of the AdminDao. Also, make sure that the <select> element has the correct id, resultType, and SQL query.

Once you have updated the mapper configuration file, re-run the test and it should be able to find the bound statement and execute the query successfully.


原文地址: https://www.cveoy.top/t/topic/o676 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录