diff --git a/pom.xml b/pom.xml
index 7f6525b..fd1075a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.blinkfox
fenix
- 2.3.4
+ 2.3.5
jar
fenix
diff --git a/src/main/java/com/blinkfox/fenix/config/FenixConfigManager.java b/src/main/java/com/blinkfox/fenix/config/FenixConfigManager.java
index 5d9378a..ee32794 100644
--- a/src/main/java/com/blinkfox/fenix/config/FenixConfigManager.java
+++ b/src/main/java/com/blinkfox/fenix/config/FenixConfigManager.java
@@ -40,7 +40,7 @@ public final class FenixConfigManager {
+ " | __)/ __ \\ / \\| \\ \\/ /\n"
+ " | \\\\ ___/| | \\ |> < \n"
+ " \\___ / \\___ >___| /__/__/\\_ \\\n"
- + " \\/ \\/ \\/ \\/ v2.3.3\n";
+ + " \\/ \\/ \\/ \\/ v2.3.5\n";
/**
* Fenix 配置信息实例.
diff --git a/src/main/java/com/blinkfox/fenix/jpa/FenixJpaClassWriter.java b/src/main/java/com/blinkfox/fenix/jpa/FenixJpaClassWriter.java
index 508e39b..8a0e1cd 100644
--- a/src/main/java/com/blinkfox/fenix/jpa/FenixJpaClassWriter.java
+++ b/src/main/java/com/blinkfox/fenix/jpa/FenixJpaClassWriter.java
@@ -4,6 +4,7 @@
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtMethod;
+import javassist.LoaderClassPath;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -97,7 +98,9 @@ public static synchronized void modify() {
log.info("【Fenix 提示】检测到你的 Spring Data JPA 版本较低,为了兼容老版本的 JPA,将修改部分 class 字节码来做兼容。"
+ "不过条件允许的话,我仍然建议你将 Spring Data JPA 版本升级到 v2.3.0 及之后的版本.");
try {
- CtClass ctClass = ClassPool.getDefault().get("com.blinkfox.fenix.jpa.FenixQueryLookupStrategy");
+ ClassPool classPool = ClassPool.getDefault();
+ classPool.appendClassPath(new LoaderClassPath(Thread.currentThread().getContextClassLoader()));
+ CtClass ctClass = classPool.get("com.blinkfox.fenix.jpa.FenixQueryLookupStrategy");
// 修改 createOldJpaQueryLookupStrategy 方法,创建 JpaQueryLookupStrategy 对象.
CtMethod lookupStrategyMethod = ctClass.getDeclaredMethod("createOldJpaQueryLookupStrategy");