Skip to content

Instantly share code, notes, and snippets.

@altfatterz
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save altfatterz/358e8a0e7d5b6b126f41 to your computer and use it in GitHub Desktop.
Save altfatterz/358e8a0e7d5b6b126f41 to your computer and use it in GitHub Desktop.
@Configuration
@Profile("dev")
public class StandaloneDataConfig {
@Bean
public DataSource dataSource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.H2)
.addScript("classpath:com/bank/config/sql/schema.sql")
.addScript("classpath:com/bank/config/sql/test-data.sql")
.build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment