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);
Mybatis错误:Parameter 'XXX' not found. Available parameters are [1, 0, param1, param2]
原文地址:https://www.cnblogs.com/durui/p/8279117.html
时间: 2024-10-18 05:31:26