Skip to content

Commit ce08b8d

Browse files
author
chenlei2
committed
强制写库
1 parent a0efc42 commit ce08b8d

File tree

1 file changed

+1
-0
lines changed
  • spring-boot-mybatis-rw/spring-boot-mybatis-rw-starter/src/main/java/org/spring/boot/mybatis/rw/starter/datasource

1 file changed

+1
-0
lines changed

spring-boot-mybatis-rw/spring-boot-mybatis-rw-starter/src/main/java/org/spring/boot/mybatis/rw/starter/datasource/DataSourceProxy.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ public Object invoke(Object proxy, Method method, Object[] args) throws Throwabl
182182
// Invocation on ConnectionProxy interface coming in...
183183
if (method.getName().equals("setTransactionIsolation") && args != null && (Integer) args[0] == Connection.TRANSACTION_SERIALIZABLE) {
184184
args[0] = defaultTransactionIsolation();
185+
ConnectionHold.FORCE_WRITE.set(Boolean.TRUE);
185186
}
186187
if (method.getName().equals("equals")) {
187188
// We must avoid fetching a target Connection for "equals".

0 commit comments

Comments
 (0)