mongodb初始化注销
This commit is contained in:
parent
43f01064ee
commit
2eaafe65d5
|
@ -18,7 +18,7 @@ spring:
|
|||
# username: hzya
|
||||
flyway:
|
||||
# 启动flyway migration, 默认为true
|
||||
enabled: false
|
||||
enabled: true
|
||||
datasource:
|
||||
dynamic:
|
||||
druid:
|
||||
|
|
|
@ -6,6 +6,8 @@ server:
|
|||
tomcat:
|
||||
uri-encoding: utf-8
|
||||
spring:
|
||||
autoconfigure:
|
||||
exclude: org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration
|
||||
flyway:
|
||||
# 启动flyway migration, 默认为true
|
||||
enabled: true
|
||||
|
|
|
@ -48,6 +48,7 @@ public class FlywayConfig {
|
|||
|
||||
@PostConstruct
|
||||
public void migrateOrder() {
|
||||
if("false".equals(enabled)){
|
||||
String pwd = AESUtil.decrypt(password);
|
||||
DynamicRoutingDataSource ds = (DynamicRoutingDataSource) dataSource;
|
||||
DataSource dsDatasource = null;
|
||||
|
@ -72,5 +73,6 @@ public class FlywayConfig {
|
|||
.load();
|
||||
flyway.migrate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue