org.apache.ibatis.builder.IncompleteElementException: Could not find result map

這是由於mybatis的Mapper.xml文件中前後resultMap 匹配不上而報錯:

<mapper namespace="com.StudentMapper">
 <resultMap id="students" type="com.Student">
  <result column="s_id" property="sid"  />
  <result column="s_name" property="sname" />
 </resultMap>
 <sql id="commonColumns">
  s_id ,s_name
 </sql>
 <select id="queryBySId" parameterType="Long"  resultMap="student">

.......

</select>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章