Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ForceWrite怎么用呢? #4

Open
syncml opened this issue Nov 20, 2016 · 2 comments
Open

ForceWrite怎么用呢? #4

syncml opened this issue Nov 20, 2016 · 2 comments

Comments

@syncml
Copy link

syncml commented Nov 20, 2016

很好的插件,准备用到项目中,请问如果我要强制走主库,怎么操作?谢谢

@chenlei2
Copy link
Owner

在每次执行 sql之前先执行 ConnectionHold.FORCE_WRITE.set(true);

@chenlei2 chenlei2 reopened this May 16, 2018
@chenlei2
Copy link
Owner

最新版本:@transactional(isolation = Isolation.SERIALIZABLE) 强制本事务都走写库,插件会把事务隔离级别修改为默认隔离级别

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants