mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-17 00:15:11 +00:00
feat[version]: use javassist to enhance version interface
This commit is contained in:
1 parent
1cb440a5f6
commit
a79fdfceda
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -75,7 +75,7 @@ public class EntityCache<PK extends Comparable<PK>, E extends IEntity<PK>> imple
|
|||||||
version = cacheVersionReflect;
|
version = cacheVersionReflect;
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
version = EnhanceUtils.createEventReceiver(cacheVersionReflect);
|
version = EnhanceUtils.createVersion(cacheVersionReflect);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException(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();
|
var classPool = ClassPool.getDefault();
|
||||||
|
|
||||||
Class<?> clazz = cacheVersion.getEntityClass();
|
Class<?> clazz = cacheVersion.getEntityClass();
|
||||||
|
|||||||
Reference in new issue
Block a user