spring-data-jpa 多数据源

This commit is contained in:
程序猿DD
2016-04-07 10:21:15 +08:00
parent 064f62b638
commit ef18234c23
8 changed files with 112 additions and 21 deletions
@@ -1,9 +1,11 @@
spring.datasource.primary.url=jdbc:mysql://localhost:3306/test1
spring.datasource.primary.username=root
spring.datasource.primary.password=root
spring.datasource.primary.password=52261340
spring.datasource.primary.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.secondary.url=jdbc:mysql://localhost:3306/test2
spring.datasource.secondary.username=root
spring.datasource.secondary.password=root
spring.datasource.secondary.password=52261340
spring.datasource.secondary.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.properties.hibernate.hbm2ddl.auto=create-drop