<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.0</version>
</dependency>
spring:
datasource:
dynamic:
primary: public #默认数据源
strict: false #默认为false,true未匹配到数据时抛出异常,false则使用默认数据源
datasource:
public:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.57.20.90/public?serverTimezone=GMT&rewriteBatchedStatements=true
username: publics
password: 'publics'
personalinformation:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://10.57.20.90/personalinformation?serverTimezone=GMT&rewriteBatchedStatements=true
username: publics
password: 'publics'
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- bangwoyixia.com 版权所有 湘ICP备2023022004号-2
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务