![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybaits
vinceLin054
一只JAVA小菜鸡
展开
-
Mybatis自定义插件
源码mybatis 在构建Executor的时候进行注入所有插件实现1.实现接口org.apache.ibatis.plugin.Interceptor2.类添加注解 @Intercepts这个注解只有一个属性 value数组 类型为 Signature,注解@Signature包含属性Class<?> type();支持四大类型:Executor(sql执行)、ParameterHandler(参数处理)、ResultSetHandler(结果集处理)、StatementH原创 2020-10-12 21:13:08 · 465 阅读 · 0 评论 -
使用mybatis-plus想要修改某字段为null
问题场景使用mybatis + mybatisPlus进行修改某字段,想要将其设为null, 但执行时没有成功。原因mybatis-plus会将所有为空的字段在修改时进行过滤,不进行设为空的修改操作。解决办法在相关字段上加上注解@TableField(strategy = FieldStrategy.IGNORED)...原创 2019-12-31 10:14:39 · 10102 阅读 · 2 评论