Mybatis错误:Parameter 'XXX' not found. Available parameters are [1, 0, param1, param2]
原因:传递的参数超过一个
记
解决办法:
(1)直接把值改成数字
<select id="LoginUser" parameterType="String" resultMap="userMap"> SELECT * FROM user where emplnumb = #{0} and password=#{1} </select>
(2)在变量上加注解@Param
Public User selectUser(@param(“userName”) String name,@param (“userpassword”)
public List<user> getUserInformation(@Param("user") User user);