
mybatis
wuweiforever
这个作者很懒,什么都没留下…
展开
-
Mybatis绑定错误:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
1.检查xml文件的namespace是否和xml文件的package名称一一对应 2.dao中的函数名称和xml中的id是否对应 3.若使用了mybatis-plus,则application配置文件中的配置应为mybatis-plus mybatis-plus: mapper-locations: classpath:/mapper/*Mapper.xml type-aliases-package: com.casic.guidelinemanage.entity #config-locat原创 2021-02-07 19:26:40 · 254 阅读 · 0 评论 -
Mybatis批量删除
当Dao层传入的参数是字符串数组: String[ ] businessIdArr 在*SQL.xml中: <!-- 删除业务 --> <delete id="deleteBusiness" parameterType="String" > delete from LOGS_BUSINESS where business_id in <fo...原创 2018-08-28 12:59:03 · 321 阅读 · 0 评论 -
mybatis使用注意
1.在SQL.xml中的新增数据insert不能写返回值类型:resultType原创 2018-08-30 14:49:30 · 163 阅读 · 0 评论 -
MySQL报错总结及解决--Parameter index out of range (1 > number of parameters, which is 0)
Parameter index out of range (1 > number of parameters, which is 0).(参数索引超出范围) 情况1: 在mybatis里面like %#{name} %不加引号,正确写法:like concat('%',#{name},'%'); 情况2. 问号用的是中文输入法,应换成英文 String sql = "DELETE FROM ...原创 2018-11-14 17:03:01 · 1995 阅读 · 0 评论