Java自动化测试

【Mybatis】报错 Type interface *** i

2020-03-20  本文已影响0人  小笨笨的花花

问题:

多个实体类情况下,配置Mybatis报错

解决:

1 Sql.config文件中需要加上Mapper关系

    <mappers>
        <mapper resource="com/it/dao/IUserDao.xml"/>
        <mapper resource="com/it/dao/IAccountDao.xml"/>
    </mappers>

2 Mapper.xml对应关系与接口的层级和包名一致


image.png

与此相关博客:
https://www.cnblogs.com/ZekeBlog/p/9360689.html
https://blog.csdn.net/dancheng1/article/details/53975626

上一篇 下一篇

猜你喜欢

热点阅读