Java Code Examples for org.springframework.boot.jdbc.DatabaseDriver#ORACLE

The following examples show how to use org.springframework.boot.jdbc.DatabaseDriver#ORACLE . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
public void customize(FluentConfiguration configuration) {
	// boot's flyway auto-config doesn't allow to define callbacks per
	// vendor id, so essentially customizing those here.
	DataSource dataSource = configuration.getDataSource();
	DatabaseDriver databaseDriver = getDatabaseDriver(dataSource);
	logger.info("Customizing flyway config, detected DatabaseDriver as {}.", databaseDriver);
	if (databaseDriver == DatabaseDriver.POSTGRESQL) {
		configuration.callbacks(new PostgresBeforeBaseline());
	}
	else if (databaseDriver == DatabaseDriver.MYSQL || databaseDriver == DatabaseDriver.MARIADB) {
		configuration.callbacks(new MysqlBeforeBaseline());
	}
	else if (databaseDriver == DatabaseDriver.SQLSERVER) {
		configuration.callbacks(new MsSqlBeforeBaseline());
	}
	else if (databaseDriver == DatabaseDriver.ORACLE) {
		configuration.callbacks(new OracleBeforeBaseline());
	}
	else if (databaseDriver == DatabaseDriver.DB2) {
		configuration.callbacks(new Db2BeforeBaseline());
	}
}
 
Example 2
@Override
public void customize(FluentConfiguration configuration) {
	// boot's flyway auto-config doesn't allow to define callbacks per
	// vendor id, so essentially customizing those here.
	DataSource dataSource = configuration.getDataSource();
	DatabaseDriver databaseDriver = getDatabaseDriver(dataSource);
	if (databaseDriver == DatabaseDriver.POSTGRESQL) {
		configuration.callbacks(new PostgresBeforeBaseline());
	}
	else if (databaseDriver == DatabaseDriver.MYSQL || databaseDriver == DatabaseDriver.MARIADB) {
		configuration.callbacks(new MysqlBeforeBaseline());
	}
	else if (databaseDriver == DatabaseDriver.SQLSERVER) {
		configuration.callbacks(new MsSqlBeforeBaseline());
	}
	else if (databaseDriver == DatabaseDriver.ORACLE) {
		configuration.callbacks(new OracleBeforeBaseline());
	}
	else if (databaseDriver == DatabaseDriver.DB2) {
		configuration.callbacks(new Db2BeforeBaseline());
	}
}