问题描述:
Result type not match for select id="selectUser"
srcType: com.kuang.pojo.User
targetType: com.kuang.pojo.User

解决办法:
方法一:
在mybatis-config.xml中 重新给实体类起别名;
<typeAlias type="com.kuang.pojo.User" alias="User"/>

方法二:
你的项目里有多个User类,重新给User改个名字叫Users就行;


所有评论(0)