Parameter '' not found. Available parameters are [arg1, arg0, param1, param2]

如果springboot报标题所示的错误, 大概是因为在mapper.xml的sql参数形式没写对,比如:

public TBlogUser checkUser (String userName, String password);

上面这行代码对应的mapper.xml应该是

<select id="checkUser" parameterType="java.lang.String" resultMap="BaseResultMap">
     SELECT * FROM T_BLOG_USER 
     WHERE USERNAME=#{arg0} 
     AND PASSWORD=#{arg1}
select>

你可能感兴趣的:(SpringBoot)