mybatis问题汇总

1、

Invalid bound statement (not found): com.**.**Dao.selectList

原因:Dao.xml 没有被绑定

绑定方式:在mybatis配置文件中进行注册

2、

【Mybatis】Parameter 'XXX' not found. Available parameters are [1, 0, param1, param2]

sql执行传入多个参数,不能找到对应的参数

在Dao层加入@Param注解即可

    List<MaterialInfo> selectMaterialInfo(@Param("type") String type, @Param("brandName") String brandName);
原文地址:https://www.cnblogs.com/ljangle/p/11757489.html