Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

#多数据源:建议 通过配置默认数据源key 来选择默认数据源,而不是使用第一个配置的数据源作为默认数据源 #333

Open
panxsz opened this issue May 9, 2024 · 0 comments

Comments

@panxsz
Copy link

panxsz commented May 9, 2024

通过配置项来控制 使用哪个默认数据源

mybatis-flex.default.ds.key=default

mybatis-flex.datasource.ds1.password=root@123
mybatis-flex.datasource.ds1.url=jdbc:mysql://127.0.0.1:3306/ds1?useUnicode=true&characterEncoding=utf8
mybatis-flex.datasource.ds1.username=root

mybatis-flex.datasource.ds2.password=root@123
mybatis-flex.datasource.ds2.url=jdbc:mysql://127.0.0.1:3306/ds2?useUnicode=true&characterEncoding=utf8
mybatis-flex.datasource.ds2.username=root

mybatis-flex.datasource.default.password=root@123
mybatis-flex.datasource.default.url=jdbc:mysql://127.0.0.1:3306/defalut?useUnicode=true&characterEncoding=utf8
mybatis-flex.datasource.default.username=root

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

No branches or pull requests

1 participant