Consolidate flyway modules (#3319)

This commit is contained in:
José Carlos Valero Sánchez
2017-12-30 05:05:05 +01:00
committed by Grzegorz Piwowarek
parent c52b2a4ff3
commit 91be3244f2
13 changed files with 69 additions and 115 deletions
@@ -0,0 +1,21 @@
package com.baeldung.flywaycallbacks;
import javax.sql.DataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
@Configuration
public class FlywayCallbackTestConfig {
@Bean
public DataSource createDatasource() {
EmbeddedDatabaseBuilder dbBuilder = new EmbeddedDatabaseBuilder();
return dbBuilder.setType(EmbeddedDatabaseType.H2)
.setName("DATABASE")
.build();
}
}