本文整理了Java中com.googlecode.flyway.core.Flyway.setLocations()
方法的一些代码示例,展示了Flyway.setLocations()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flyway.setLocations()
方法的具体详情如下:
包路径:com.googlecode.flyway.core.Flyway
类名称:Flyway
方法名:setLocations
[英]Sets the locations on the classpath to scan recursively for migrations. Locations may contain both sql and java-based migrations. (default: db.migration)
[中]将类路径上的位置设置为递归扫描迁移。位置可能同时包含sql和基于java的迁移。(默认值:db.migration)
代码示例来源:origin: com.googlecode.flyway-test-extensions/flyway-spring3-test
flyWay.setLocations(useLocations);
flyWay.setLocations(oldLocations);
代码示例来源:origin: com.googlecode.flyway-test-extensions/flyway-spring4-test
flyWay.setLocations(useLocations);
flyWay.setLocations(oldLocations);
代码示例来源:origin: com.intuit.wasabi/wasabi-repository-datastax
void initialize(Flyway flyway) {
flyway.setLocations("com/intuit/wasabi/repository/impl/mysql/migration");
flyway.setDataSource(transactionFactory.getDataSource());
flyway.migrate();
}
代码示例来源:origin: com.intuit.wasabi/wasabi-repository-datastax
/**
* Initializes the database.
*
* @param flyway flyway instance
*/
void initialize(Flyway flyway, String mutagenRootResourcePath) {
flyway.setLocations(mutagenRootResourcePath);
flyway.setDataSource(transactionFactory.getDataSource());
flyway.migrate();
}
代码示例来源:origin: com.intuit.wasabi/wasabi-repository-datastax
private void initialize(Flyway flyway) {
flyway.setLocations("com/intuit/wasabi/repository/impl/mysql/migration");
flyway.setDataSource(transactionFactory.getDataSource());
flyway.migrate();
}
代码示例来源:origin: com.googlecode.flyway-test-extensions/flyway-spring-test
flyWay.setLocations(useLocations);
flyWay.setLocations(oldLocations);
代码示例来源:origin: ch.inftec.ju/ju-testing
@Override
public void execute(DataSource ds) {
Flyway flyway = new Flyway();
flyway.setDataSource(ds);
flyway.setLocations(locations);
flyway.migrate();
}
});
代码示例来源:origin: com.googlecode.flyway/flyway-core
setLocations(StringUtils.tokenizeToStringArray(locationsProp, ","));
代码示例来源:origin: jvelo/mayocat-shop
@Override
protected void run(Bootstrap<T> bootstrap, Namespace namespace, T configuration) throws Exception
{
final DataSourceFactory dbConfig = strategy.getDataSourceFactory(configuration);
dbConfig.setMaxSize(1);
dbConfig.setMinSize(1);
Flyway flyway = new Flyway();
flyway.setLocations(MAYOAPP_MIGRATIONS);
flyway.setDataSource(dbConfig.getUrl(), dbConfig.getUser(), dbConfig.getPassword());
if (flyway.info().current() == null) {
flyway.setInitVersion("0000.0001");
flyway.init();
}
flyway.migrate();
}
}
代码示例来源:origin: com.googlecode.flyway/flyway-ant
String[] locationsValue = getLocations();
if (locationsValue != null) {
flyway.setLocations(locationsValue);
内容来源于网络,如有侵权,请联系作者删除!