Could not complete request
org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.bbx.springmvc.pojo.User
意思:返回的结果和类型不一致。
出现问题在mapper上
错误:
<mapper namespace="com.bbx.springmvc.dao.UserMapper">
<resultMap id="user" type="com.bbx.springmvc.pojo.User">
<id property="id" column="id"/>
<result property="username" column="username"/>
<result property="password" column="password"/>
</resultMap>
<select id="selectUserByusername" parameterType="String" resultMap="**com.bbx.springmvc.pojo.User**">
select * from user where username=#{username};
</select>
正确:
<mapper namespace="com.bbx.springmvc.dao.UserMapper">
<resultMap id="user" type="com.bbx.springmvc.pojo.User">
<id property="id" column="id"/>
<result property="username" column="username"/>
<result property="password" column="password"/>
</resultMap>
<select id="selectUserByusername" parameterType="String" resultMap="**user**">
select * from user where username=#{username};
</select>