mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-20 22:24:40 +00:00
feat[version]: use javassist to enhance version interface
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ public class EntityCache<PK extends Comparable<PK>, E extends IEntity<PK>> imple
|
||||
version = cacheVersionReflect;
|
||||
} else {
|
||||
try {
|
||||
version = EnhanceUtils.createEventReceiver(cacheVersionReflect);
|
||||
version = EnhanceUtils.createVersion(cacheVersionReflect);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public abstract class EnhanceUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static IVersion createEventReceiver(VersionReflect cacheVersion) throws NotFoundException, CannotCompileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
|
||||
public static IVersion createVersion(VersionReflect cacheVersion) throws NotFoundException, CannotCompileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
|
||||
var classPool = ClassPool.getDefault();
|
||||
|
||||
Class<?> clazz = cacheVersion.getEntityClass();
|
||||
|
||||
Reference in New Issue
Block a user