Skip to content

Commit

Permalink
开启 v2.3.5 版本
Browse files Browse the repository at this point in the history
  • Loading branch information
blinkfox committed Jul 31, 2020
1 parent d6af78a commit 2d2339c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.blinkfox</groupId>
<artifactId>fenix</artifactId>
<version>2.3.4</version>
<version>2.3.5</version>
<packaging>jar</packaging>

<name>fenix</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public final class FenixConfigManager {
+ " | __)/ __ \\ / \\| \\ \\/ /\n"
+ " | \\\\ ___/| | \\ |> < \n"
+ " \\___ / \\___ >___| /__/__/\\_ \\\n"
+ " \\/ \\/ \\/ \\/ v2.3.3\n";
+ " \\/ \\/ \\/ \\/ v2.3.5\n";

/**
* Fenix 配置信息实例.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 2d2339c

Please sign in to comment.