MyBatis 拦截器使用
实现接口 org.apache.ibatis.plugin.Interceptor
添加注解
@Intercepts({@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class})})
重写两个普通方法
@Override
public Object plugin(Object target) {
if (target instanceof St.
原创
2022-01-17 11:54:22 ·
419 阅读 ·
0 评论