|
Spring-MVCの散歩道 > 応用の森(Spring Boot編) > 複数のDB(データソース)に接続する
|
spring:
mybatis:
#プライマリDB接続情報(PostgreSQL)
primary:
driverClassName: org.postgresql.Driver
jdbcUrl: jdbc:postgresql://localhost/primarydb
jdbcUsername: dbuser
jdbcPassword: dbpassword
maxidle: 5
minidle: 3
initialSize: 5
defaultAutoCommit: false
#Mybatis設定情報
configfile: classpath:config/mybatis-config.xml
mapperlocation: classpath:mappers/primary/*.xml
typealiases: jp.dip.arimodoki.model.dto
#セカンダリDB接続情報(MariaDB)
secondary:
driverClassName: org.mariadb.jdbc.Driver
jdbcUrl: jdbc:mysql://localhost/secondarydb
jdbcUsername: dbuser
jdbcPassword: dbpassword
maxidle: 5
minidle: 3
initialSize: 5
defaultAutoCommit: false
#Mybatis設定情報
configfile: classpath:config/mybatis-config.xml
mapperlocation: classpath:mappers/secondary/*.xml
typealiases: jp.dip.arimodoki.model.dto
|