达梦数据库 与 mysql 整合 多数据源
有demo 发 demo 或者相关链接也可以
在application.yml里面配置多个数据源。
dynamic:
datasource:
master: #数据源1
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/examcloud?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: 1234
driver-class-name: com.mysql.jdbc.Driver
slave: #数据源2
#driver-class-name: com.mysql.jdbc.Driver
#url: jdbc:mysql://localhost:3306/test?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
#username: root
#password: root