@Select("SELECT id FROM ae_post ORDER BY id DESC  LIMIT #{page},#{size}")
List<Post> getAllForPage(@Param("page") int page, @Param("size")int size);

dao层写入,解决方法如上

注:多参数需要添加 @Param("参数名") int 参数名

java 传入多个参数时报"Parameter 'XXX' not found. Available parameters are [arg1, arg0, param1,..." 解决方案的更多相关文章

  1. MyBatisSystemException->BindingException: Parameter 'xxx' not found. Available parameters are [arg1, arg0, param1, param2]

    最近在使用Spring boot+mybatis做新的基础框架,结果碰到如下问题: 1 org.mybatis.spring.MyBatisSystemException: nested except ...

  2. SpringBoot整合Mybatis注解版---update出现org.apache.ibatis.binding.BindingException: Parameter 'XXX' not found. Available parameters are [arg1, arg0, param1, param2]

    SpringBoot整合Mybatis注解版---update时出现的问题 问题描述: 1.sql建表语句 DROP TABLE IF EXISTS `department`; CREATE TABL ...

  3. org.apache.ibatis.binding.BindingException: Parameter 'xxx' not found. Available parameters are [arg1, arg0, param1, param2]

    这个异常说明参数没有加上@Param注解,加上这个注解就行了. 默认情况下mybatis把参数按顺序转化为[0, 1, param1, param2],也就是说#{0} 和 #{param1} 是一样 ...

  4. Mybatis传多个参数的问题 及MyBatis报错 Parameter '0' not found. Available parameters are [arg1, arg0, param1 问题

    对于使用Mybatis ,传多个参数,我们可以使用对象封装外,还可以直接传递参数 对象的封装,例如查询对象条件basequery对象 <select id="getProductByP ...

  5. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'userId' not found. Available parameters are [arg1, arg0, param1, param2]

    2018-06-27 16:43:45.552  INFO 16932 --- [nio-8081-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : ...

  6. ### Cause: org.apache.ibatis.binding.BindingException: Parameter 'name' not found. Available parameters are [arg1, arg0, param1, param2]

    org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: org.apache.ib ...

  7. org.apache.ibatis.binding.BindingException: Parameter '0' not found. Available parameters are [arg1, arg0, param1, param2]

    报错信息如下: org.apache.ibatis.binding.BindingException: Parameter '0' not found. Available parameters ar ...

  8. Springboot-001-解决nested exception is org.apache.ibatis.binding.BindingException: Parameter 'env' not found. Available parameters are [arg1, arg0, param1, param2]

    环境:Springboot + Mybatis + MySQL + VUE 场景: 前端发出数据比对请求,在服务后台与数据库交互时,接口提示错误信息如下所示: { "code": ...

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

    调用的方法: List<Card> temp = cardService.queryRepeat(Type,shop); xml: <select id="queryRep ...

随机推荐

  1. php的socket编程(socket关键几个函数)

    php的socket编程(socket关键几个函数) 一.总结 一句话总结: socket_create.socket_connect.socket_bind.socket_listen.socket ...

  2. JavaScript笔记(第一章,第二章)

    JavaScript笔记(第一章,第二章) 第一章: <meta http-equiv="Content-Type" content="text/html; cha ...

  3. Bootstrap 避免模态框在用户点击背景空白处时,会自动关闭。

    问题: Bootstrap 模态框在用户点击背景空白处时,会自动关闭. 解决方法: 在HTML页面中编写模态框时,在div初始化时添加属性 aria-hidden=”true” data-backdr ...

  4. ApiPost

    模拟POST.Get 请求的工具----APIpost(中文版POSTMAN) 快速生成.一键导出api文档 在线模拟调试,结果实时返回 模拟登录后请求API 支持团队协作 模拟POST.Get 请求 ...

  5. FreeBSD_11-系统管理——{Part_a-bhyve}

    ;; 创建 vm: #!/usr/bin/env zsh bridgeIF=bridge0 laggIF=lagg0 tapIF=tap0 phyIF_0=re0 phyIF_1=em0 isoPat ...

  6. sublime里面几个个人觉得比较实用的快捷键

    Alt+F3 选中文本按下快捷键,即可一次性选择全部的相同文本进行同时编辑.举个栗子:快速选中并更改所有相同的变量名.函数名等. Ctrl+L 选中整行,继续操作则继续选择下一行,效果和 Shift+ ...

  7. find out the installed and runing tomcat version in Linux

    To find out the Tomcat version, find this file – version.sh for *nix or version.bat for Windows. Thi ...

  8. js 实现图片懒加载

    搬运自其他大神,因为找不到链接了就没放,找到了补上. 个人情况:页面超过一屏,下方是大量图片数据(后台传来的html数据) ,想做到一开始不加载下方图片,滚动到进入可视区再加载图片. html:(需先 ...

  9. UIPageViewController看这篇就够了

    先说初始化 - (UIPageViewController *)PageViewController{ if(!_PageViewController){ //书脊位置,只有在UIPageViewCo ...

  10. tomcat nio apr

    NIO[root@localhost ~]# vim /usr/local/tomcat9/conf/server.xml<Connector port="8080" pro ...