Skip to content

Commit 8b18498

Browse files
authored
Merge pull request #16 from myme5261314/master
Add comment to help the developers facing issue when using flyway-core in APIJSON-MultiDataSource project
2 parents 9e3865d + 4a9289c commit 8b18498

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoDataSourceConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public HikariDataSource hikaricpDataSource() {
4444
* https://github.com/alibaba/druid/blob/master/src/test/java/com/alibaba/druid/DbTestCase.java
4545
* @author Lemon
4646
*/
47+
// Need to be specify to explicit one when using multiple datasource. Use this or config in application.yml
48+
// @FlywayDataSource
4749
@Bean
4850
@ConfigurationProperties(prefix = "spring.datasource.druid")
4951
public DruidDataSource druidDataSource() {

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/resources/application.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
spring:
2+
# If using flyway-core dependency, either comment this out or use @FlywayDatasource in DemoDataSourceConfig
3+
# flyway:
4+
# url: ${spring.datasource.hikari.jdbc-url}
5+
# user: ${spring.datasource.hikari.username}
6+
# password: ${spring.datasource.hikari.password}
27
datasource:
38
# type: com.zaxxer.hikari.HikariDataSource
49
# driver-class-name: com.mysql.cj.jdbc.Driver

0 commit comments

Comments
 (0)