From ce08b8deba4a8458e9b5a6572f36c3a956041ae4 Mon Sep 17 00:00:00 2001 From: chenlei2 Date: Tue, 1 May 2018 09:37:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=88=B6=E5=86=99=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boot/mybatis/rw/starter/datasource/DataSourceProxy.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-mybatis-rw/spring-boot-mybatis-rw-starter/src/main/java/org/spring/boot/mybatis/rw/starter/datasource/DataSourceProxy.java b/spring-boot-mybatis-rw/spring-boot-mybatis-rw-starter/src/main/java/org/spring/boot/mybatis/rw/starter/datasource/DataSourceProxy.java index f3f5f15..549f81a 100644 --- a/spring-boot-mybatis-rw/spring-boot-mybatis-rw-starter/src/main/java/org/spring/boot/mybatis/rw/starter/datasource/DataSourceProxy.java +++ b/spring-boot-mybatis-rw/spring-boot-mybatis-rw-starter/src/main/java/org/spring/boot/mybatis/rw/starter/datasource/DataSourceProxy.java @@ -182,6 +182,7 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl // Invocation on ConnectionProxy interface coming in... if (method.getName().equals("setTransactionIsolation") && args != null && (Integer) args[0] == Connection.TRANSACTION_SERIALIZABLE) { args[0] = defaultTransactionIsolation(); + ConnectionHold.FORCE_WRITE.set(Boolean.TRUE); } if (method.getName().equals("equals")) { // We must avoid fetching a target Connection for "equals".