Skip to content

Instantly share code, notes, and snippets.

@elpete
Created November 29, 2016 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save elpete/888d0c0f6f3f31d642b45e8f76ad0b24 to your computer and use it in GitHub Desktop.
Save elpete/888d0c0f6f3f31d642b45e8f76ad0b24 to your computer and use it in GitHub Desktop.
In-memory database for testing
component displayname="Application" {
// Set up an in-memory testing datasource
// You may need to install the H2 driver (or Apache Derby, or whatever)
this.datasources[ "testing" ] = {
class: 'org.h2.Driver',
connectionString: 'jdbc:h2:mem:testing;MODE=MySQL',
username = "sa"
};
this.datasource = "testing";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment