Skip to content

Commit

Permalink
feat: 5.0.4 预发发布
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Apr 6, 2023
1 parent edfcd8e commit d3410b1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
import com.plugins.mybaitslog.IClassFileTransformer;
import javassist.*;

import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.IllegalClassFormatException;
import java.security.ProtectionDomain;

import com.linkkou.mybatis.log.SubInterceptorChain;

/**
* A <code>DynamicSqlSourceMonitor</code> Class
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void transform() {
final CtConstructor declaredConstructor = ctClass.getDeclaredConstructor(new CtClass[]{classPool.getCtClass("org.apache.ibatis.session.Configuration"), classPool.getCtClass("java.lang.String"), classPool.getCtClass("java.lang.Class")});
declaredConstructor.insertAfter("{$0._rootSqlNode_ = $2;}");
//写入
ctClass.writeFile();
//ctClass.writeFile();
//加载该类的字节码(不能少)
ctClass.toClass(LogInterceptor.class.getClassLoader(), LogInterceptor.class.getProtectionDomain());
ctClass.detach();
Expand Down

0 comments on commit d3410b1

Please sign in to comment.