Skip to content

Commit

Permalink
1.6.19
Browse files Browse the repository at this point in the history
  • Loading branch information
noear committed Jan 22, 2022
1 parent 5e35ee7 commit a6d1360
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import java.lang.reflect.InvocationHandler;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;

/**
Expand Down Expand Up @@ -41,6 +43,10 @@ public static boolean binding(BeanWrap bw) {
}


/////////////////////////////////////////////

private static Set<Class<?>> tryCreateCached = new HashSet<>();

/**
* 为类,系上拦截代理
*
Expand All @@ -51,6 +57,13 @@ public static void attach(Class<?> clz, InvocationHandler handler) {
return;
}

//去重处理
if (tryCreateCached.contains(clz)) {
return;
} else {
tryCreateCached.add(clz);
}

Aop.wrapAndPut(clz).proxySet(new BeanProxy(handler));
}

Expand Down

0 comments on commit a6d1360

Please sign in to comment.