本文整理了Java中org.flywaydb.core.Flyway.setClassLoader()
方法的一些代码示例,展示了Flyway.setClassLoader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flyway.setClassLoader()
方法的具体详情如下:
包路径:org.flywaydb.core.Flyway
类名称:Flyway
方法名:setClassLoader
暂无
代码示例来源:origin: apache/incubator-gobblin
private DatabaseJobHistoryStoreSchemaManager(Properties properties) {
flyway = new Flyway();
flyway.configure(properties);
flyway.setClassLoader(this.getClass().getClassLoader());
}
代码示例来源:origin: org.apache.gobblin/gobblin-metastore
private DatabaseJobHistoryStoreSchemaManager(Properties properties) {
flyway = new Flyway();
flyway.configure(properties);
flyway.setClassLoader(this.getClass().getClassLoader());
}
代码示例来源:origin: com.linkedin.gobblin/gobblin-metastore
private DatabaseJobHistoryStoreSchemaManager(Properties properties) {
flyway = new Flyway();
flyway.configure(properties);
flyway.setClassLoader(this.getClass().getClassLoader());
}
代码示例来源:origin: com.crosstreelabs/junited.flyway
@Override
protected void before(Statement statement, Description description) throws Throwable {
if (datasource == null) {
datasource = provider.get();
}
if (schema == null || database == null) {
try (Connection conn = datasource.getConnection()) {
schema = conn.getSchema();
database = conn.getMetaData().getDatabaseProductName();
} catch (SQLException ex) {
throw new RuntimeException(ex);
}
}
Flyway flyway = new Flyway();
flyway.setClassLoader(new FlywayClassLoader(FlywayRule.class.getClassLoader(), database));
flyway.setDataSource(datasource);
flyway.setSchemas(schema);
flyway.setSqlMigrationPrefix("");
flyway.setOutOfOrder(true);
flyway.migrate();
}
代码示例来源:origin: EngineHub/WorldGuard
flyway.setClassLoader(getClass().getClassLoader());
flyway.setLocations("migrations/region/" + getMigrationFolderName());
flyway.setDataSource(config.getDsn(), config.getUsername(), config.getPassword());
内容来源于网络,如有侵权,请联系作者删除!