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(); } }