出现绑定异常 绑定参数username找不到,这是一个知识点的补漏,这篇文章相信对你肯定有所帮助!
org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters are [arg1, arg0, param1, param2]
最后引用一篇文章 https://www.cnblogs.com/zhuhui-site/p/10088369.html
2.不使用@Param注解
不使用@Param注解时,参数只能有一个,并且是Javabean。在SQL语句里可以引用JavaBean的属性,而且只能引用JavaBean的属性。
// 这里id是user的属性
@Select("SELECT * from Table where id = ${id}")
Enchashment selectUserById(User user);```