传多个参数时使用索引的话,注意mybatis的版本号
在MyBatis3.4.4及以上版本不能直接使用#{0}要使用 #{arg0}
Mapper.xml文件中写
<select id="selectByNameAndPassword" resultMap="selectMap" >
select *
from user
where name = #{arg0} and password = #{arg1}
</select>
传多个参数时使用索引的话,注意mybatis的版本号
在MyBatis3.4.4及以上版本不能直接使用#{0}要使用 #{arg0}
Mapper.xml文件中写
<select id="selectByNameAndPassword" resultMap="selectMap" >
select *
from user
where name = #{arg0} and password = #{arg1}
</select>