MyBatis
文章平均质量分 85
从零到1%
这个作者很懒,什么都没留下…
展开
-
使用了@Param,还是出现nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘XXX‘ 错误
使用了@Param,还是出现nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘XXX’ 错误碰到问题的过程开发的时候出现了以下错误:nested exception is org.apache.ibatis.binding.BindingException: Parameter ‘XXX’ not found.看到这个错误的时候第一反应就是Dao层没有加@Param注解出现错误。但是去看Dao层的原创 2021-05-06 17:39:08 · 3203 阅读 · 4 评论 -
通用mapper插件代码生成器使用
文章目录一.添加依赖pom.xml二、编写生成器配置文件generatorConfig.xmlconfig.properties三、使用一.添加依赖在项目的pom.xml中添加通用mapper依赖,取代mybatis依赖。<!-- <dependency>--><!-- <groupId>org.mybatis.spring.boot</groupId>--><!-- &l原创 2021-04-07 13:57:16 · 488 阅读 · 0 评论 -
*mapper.xml中常用的SQL相关标签简介
if标签用法:<select id="listProduct" resultType="Product"> select * from product_ <if test="name!=null"> where name like concat('%',#{name},'%') </if> </select>where标签作用:标签会进行自动判断: 如果任何条件都不成立,那么就在sql语句里原创 2021-04-02 15:40:13 · 1660 阅读 · 0 评论