This commit is contained in:
yulichang 2022-12-11 10:40:27 +08:00
parent 4e629dfe0a
commit 462e132f5b
2 changed files with 4 additions and 7 deletions

View File

@ -7,6 +7,7 @@ import org.apache.ibatis.logging.Log;
import org.apache.ibatis.logging.LogFactory; import org.apache.ibatis.logging.LogFactory;
import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.plugin.Interceptor;
import org.apache.ibatis.plugin.InterceptorChain; import org.apache.ibatis.plugin.InterceptorChain;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactory;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@ -39,7 +40,7 @@ public class InterceptorConfig {
} }
for (SqlSessionFactory factory : sqlSessionFactoryList) { for (SqlSessionFactory factory : sqlSessionFactoryList) {
try { try {
Field interceptorChain = org.apache.ibatis.session.Configuration.class.getDeclaredField("interceptorChain"); Field interceptorChain = Configuration.class.getDeclaredField("interceptorChain");
interceptorChain.setAccessible(true); interceptorChain.setAccessible(true);
InterceptorChain chain = (InterceptorChain) interceptorChain.get(factory.getConfiguration()); InterceptorChain chain = (InterceptorChain) interceptorChain.get(factory.getConfiguration());
Field interceptors = InterceptorChain.class.getDeclaredField("interceptors"); Field interceptors = InterceptorChain.class.getDeclaredField("interceptors");

View File

@ -2,12 +2,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.yulichang</groupId>
<artifactId>mybatis-plus-join-root</artifactId>
<version>1.3.10</version>
</parent>
<!-- <!--
这个模块啥也没有 这个模块啥也没有
和直接引入starter效果是一模一样的 和直接引入starter效果是一模一样的
@ -19,6 +13,8 @@
<version>1.3.10</version> <version>1.3.10</version>
</dependency> </dependency>
--> -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.yulichang</groupId>
<version>1.3.10</version> <version>1.3.10</version>
<artifactId>mybatis-plus-join</artifactId> <artifactId>mybatis-plus-join</artifactId>
<name>mybatis-plus-join</name> <name>mybatis-plus-join</name>