다중 데이터베이스 설정
application.yml
databases:
mysql:
first:
jdbc-url: jdbc:mysql://127.0.0.1:3306/spring_batch?serverTimezone=UTC
username: test
password: test
driver-class-name: com.mysql.cj.jdbc.Driver
second:
jdbc-url: jdbc:mysql://127.0.0.1:3306/test?serverTimezone=UTC
username: test
password: test
driver-class-name: com.mysql.cj.jdbc.Driver
h2:
jdbc-url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
username: sa
password:
driver-class-name: org.h2.Driverconfig 설정
MysqlMybatisConfig
MysqlSecondMybatisConfig
참고
Last updated