Skip to content

Instantly share code, notes, and snippets.

@pluone
Created May 6, 2017 05:43
Show Gist options
  • Save pluone/d267f1a46349ab51dc0a2d298d33a81f to your computer and use it in GitHub Desktop.
Save pluone/d267f1a46349ab51dc0a2d298d33a81f to your computer and use it in GitHub Desktop.
embedded H2 database
@Bean
public DataSource dataSource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.H2)
.addScripts('schema.sql', 'data.sql')
.build();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment