解决方法:

<select id="selectIf" resultType="student">
SELECT id,name,age,score
FROM t_student
WHERE 1=1
<if test="arg0 != null and arg0 !=''">
AND name LIKE '%' #{arg0} '%'
</if>
<if test="arg1>=0">
AND age >= #{arg1}
</if>

</select>

出现异常情况:

如果用where就不用写1=1操作了

Parameter 'name' not found. Available parameters are [arg1, arg0, param1, param2]的更多相关文章

  1. ### 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 ...

  2. 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": ...

  3. 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 ...

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

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

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

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

  6. 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].[/]       : ...

  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. MyBatis报错 Parameter '0' not found. Available parameters are [arg1, arg0, param1, param2]

    修改 <update id="updateStatusById" parameterType="java.lang.Integer"> update ...

  9. 异常:Parameter 'username' not found. Available parameters are [arg1, arg0, param1, param2]

    内容中包含 base64string 图片造成字符过多,拒绝显示

随机推荐

  1. openstack Q版部署-----glance安装配置(4)

    镜像服务(glance)使用户能够发现,注册和检索虚拟机镜像. 它提供了一个REST API,使您可以查询虚拟机镜像元数据并检索实际镜像. 您可以将通过镜像服务提供的虚拟机映像存储在各种位置,从简单的 ...

  2. python,获取用户输入,并且将输入的内容写到.txt

    该功能缺点是必须保证该文件不存在的情况才会成功 f=open('E:/mywork/保存文件.txt','x') def userwrite(code): if code=='w': f.close( ...

  3. SQL Server - 哈希索引

    转载自:https://blog.csdn.net/josjiang1/article/details/80637076 作者:josjiang1 ————————总结———————— 使用场景: 1 ...

  4. 使用@Valid和BindingResult验证请求参数的合法性并处理校验结果

    /** * 添加用户,使用@RequestBody将请求体映射到Action方法参数中 * 使用@Valid注解验证请求参数的合法性 * 使用BindingResult处理校验结果 * @param ...

  5. Learning Discriminative Features with Class Encoder

    近来论文看了许多,但没多少时间总结下来.今天暂时记录一篇比较旧的论文,选择理由是 Discriminative features. 做图像说白了就是希望有足够有判别性的特征,这样在分类或者匹配.检索的 ...

  6. python性能分析之line_profiler模块

    line_profiler使用装饰器(@profile)标记需要调试的函数.用kernprof.py脚本运行代码,被选函数每一行花费的cpu时间以及其他信息就会被记录下来. 安装 pip3 insta ...

  7. CFtpConnection Class

    CFtpConnection Class   1.链接http://technet.microsoft.com/zh-cn/office/2kywsafk(v=vs.80) 2.测试ftp可以用这个地 ...

  8. Flask请求流程超清大图

    补充一下 request是在哪里产生的: class RequestContext(object): # app就是flask对象 self.app = app if request is None: ...

  9. 数字证书及CA的扫盲介绍

    ★ 先说一个通俗的例子 考虑到证书体系的相关知识比较枯燥.晦涩.俺先拿一个通俗的例子来说事儿. ◇ 普通的介绍信 想必大伙儿都听说过介绍信的例子吧?假设 A 公司的张三先生要到 B 公司去拜访,但是 ...

  10. zookeeper权限问题

    对cdrwa的说明如上,网上一些博客乱写误导 参考链接:http://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html 这是在使用zk ...