Logo
Storage unit configuration

Storage unit configuration #

DBPlusEngine-Driver supports all database Driver drivers and connection pools.

The example database driver is MySQL and the connection pool is HikariCP, which can be replaced by other database drivers and connection pools.

配置项说明 #

dataSources: # Storage unit configuration, can configure multiple <storage-unit-name>
  <data-source-name>: # Storage unit Name
    dataSourceClassName: # Storage unit full class name
    driverClassName: # Database driver class name, subject to the configuration of the database connection pool itself
    jdbcUrl: # Database URL connection, subject to the configuration of the database connection pool itself
    username: # Database user name,subject to the configuration of the database connection pool itself
    password: # Database password,subject to the configuration of the database connection pool itself
    # ... Other properties of the database connection pool

配置示例 #

dataSources:
  ds_1:
    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
    driverClassName: com.mysql.jdbc.Driver
    jdbcUrl: jdbc:mysql://localhost:3306/ds_1
    username: root
    password:
  ds_2:
    dataSourceClassName: com.zaxxer.hikari.HikariDataSource
    driverClassName: com.mysql.jdbc.Driver
    jdbcUrl: jdbc:mysql://localhost:3306/ds_2
    username: root
    password:
  
  # Config other storage unit