随笔分类 -  mybatis

摘要:https://www.cnblogs.com/bingsying/p/12507419.html 1 WarehouseItem warehouseItem = warehouseItemService.getById(2117733125); 2 UpdateWrapper<WarehouseI 阅读全文
posted @ 2020-10-28 10:34 南方卖菜 阅读(677) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/summerday152/p/13874936.html 阅读全文
posted @ 2020-10-28 09:30 南方卖菜 阅读(606) 评论(0) 推荐(0) 编辑
摘要:https://www.jianshu.com/p/ceb1df475021 https://baomidou.com/ 阅读全文
posted @ 2020-10-27 16:16 南方卖菜 阅读(51) 评论(0) 推荐(0) 编辑
摘要:Mapper.xml文件中的namespace与mapper接口的类路径相同。 Mapper接口方法名和Mapper.xml中定义的每个statement的id相同 Mapper接口方法的输入参数类型和mapper.xml中定义的每个sql 的parameterType的类型相同 Mapper接口方 阅读全文
posted @ 2020-10-20 16:42 南方卖菜 阅读(257) 评论(0) 推荐(0) 编辑
摘要:如果写成'%#{name}%' ,就会报错Parameter index out of range 1.表达式: name like "%"#{name}"%" 2.表达式: name like '%${name}%' 有注入 3. 表达式: name like concat(concat('%', 阅读全文
posted @ 2020-10-15 18:11 南方卖菜 阅读(246) 评论(0) 推荐(0) 编辑
摘要:public interface UserMapper{ String getNameByUserId(@Param("userId") String userId); } 当我们传入userId="34;drop table user;"后 <select id="getNameByUserId" 阅读全文
posted @ 2020-10-15 17:58 南方卖菜 阅读(181) 评论(0) 推荐(0) 编辑
摘要:一、创建一个类注入PaginationInterceptor @Configuration public class MybatisPlusConfig { /** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor( 阅读全文
posted @ 2020-08-20 09:23 南方卖菜 阅读(7746) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示