错误:Parameter '0' not found.Available parameters are [arg1, arg0, param1, param2]的解决方法

调用的方法:

  List<Card> temp = cardService.queryRepeat(Type,shop);

xml:

  <select id="queryRepeat" parameterType="String" resultType="Card">
      select * from card where card_type=#{type} and shop=#{shop}
   </select>

此時报错:Parameter '0' not found.Available parameters are [arg1, arg0, param1, param2]

解决方法:

  <select id="queryRepeat" parameterType="String" resultType="Card">
      select * from card where card_type=#{arg0} and shop=#{arg1}
   </select>

上一篇:java 传入多个参数时报"Parameter 'XXX' not found. Available parameters are [arg1, arg0, param1,..." 解决方案


下一篇:Docker 概览