ORM Bee如何在配置文件里配置多数据源

ORM Bee如何在配置文件里配置多数据源

#bee.dosql.multiDS.enable=true
#支持同时使用多种类型数据库的数据源.support different type database muli-Ds at same time.
#eg: have oracle,mysql,..., datasource
##bee.dosql.multiDS.differentDbType=true
#bee.dosql.multiDS.defalutDS=ds1
#bee.dosql.multiDS.sharding=false

#############Bee+Spring boot,使用多个数据源时,需要在spring boot工程的Application类添加:
#@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
#或者,在application.properties里添加:
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration

#bee.db.dbs[i].type   value :Hikari,Druid,c3p0,dbcp2,Tomcat,BeeMongo, default is : Hikari
#Hikari
#Hikari专用:
#bee.db.dbs[0].driverClassName = com.mysql.jdbc.Driver
#bee.db.dbs[0].jdbcUrl =jdbc:mysql://localhost:3306/bee?characterEncoding=UTF-8&useSSL=false
#Bee作了兼容处理  driverName->driverClassName ;  url ->jdbcUrl

#############Bee+Spring boot,使用多个数据源,配置实例
#dbs数组,其它下标,是否从首个元素继承属性(但dsName不能继承)
#bee.db.extendFirst=true
#
#bee.db.dbs[0].dsName=ds0
#bee.db.dbs[0].driverClassName = com.mysql.jdbc.Driver
#bee.db.dbs[0].jdbcUrl =jdbc:mysql://localhost:3306/bee?characterEncoding=UTF-8&useSSL=false
#bee.db.dbs[0].username = root
#bee.db.dbs[0].password =123456
#
#bee.db.dbs[1].dsName=ds1
#bee.db.dbs[1].driver-class-name = com.mysql.jdbc.Driver
#bee.db.dbs[1].jdbcUrl =jdbc:mysql://localhost:3306/pro?characterEncoding=UTF-8&useSSL=false
#bee.db.dbs[1].username = root
#bee.db.dbs[1].password =123456


############# Bee+Spring boot,使用单个数据源,配置实例
## 数据源配置  ; 默认是:HikariPool
#spring.datasource.url=jdbc:mysql://localhost:3306/bee?characterEncoding=UTF-8&useSSL=false
##spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#spring.datasource.driverClassName=com.mysql.jdbc.Driver
#spring.datasource.username=root
#spring.datasource.password=123456

你可能感兴趣的:(spring,boot,Bee,ORM,spring,boot,Bee,java)