【问题解决】mybatis 类型不匹配两种解决办法 -Result type not match for select id=“selectUser“ srcType: com.kuang.pojo
于 2022-08-08 11:17:36 首次发布
当遇到ResultType不匹配的问题,如在使用MyBatis时出现`Resulttypenotmatchforselectid=selectUser`,可以尝试两种解决办法。一是配置mybatis-config.xml文件,为User实体类添加别名`<typeAliastype=com.kuang.pojo.User alias=User/>`。二是检查项目中是否存在多个User类,如果存在,考虑将User类名改为Users以避免冲突。




886





