private static void prepareDataSourceContext(FlywayDataSourceContext dataSourceContext, Flyway flywayBean, FlywayTest annotation) throws Exception {
if (isAppendable(flywayBean, annotation)) {
dataSourceContext.reload(flywayBean);
} else {
String[] oldLocations = flywayBean.getLocations();
try {
if (annotation.overrideLocations()) {
flywayBean.setLocations(annotation.locationsForMigrate());
} else {
flywayBean.setLocations(ObjectArrays.concat(oldLocations, annotation.locationsForMigrate(), String.class));
}
dataSourceContext.reload(flywayBean);
} finally {
flywayBean.setLocations(oldLocations);
}
}
}
OptimizedFlywayTestExecutionListener.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:embedded-database-spring-test
作者:
评论列表
文章目录