Skip to content

Instantly share code, notes, and snippets.

@vslala
Created May 22, 2020 13:08
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vslala/d412156e5840fafa1b9f61aae5b20951 to your computer and use it in GitHub Desktop.
Save vslala/d412156e5840fafa1b9f61aae5b20951 to your computer and use it in GitHub Desktop.
Configuration for running integration tests with H2 Database, Flyway, Spring Boot JPA
# Datasource configuration for jdbc h2
# this is for file based persistent storage
# spring.datasource.url=jdbc:h2:file:/data/demo
# For in-memory storage
spring.datasource.url=jdbc:h2:mem:testdb;MODE=MySQL;DB_CLOSE_DELAY=-1;IGNORECASE=TRUE;
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=vslala
spring.datasource.password=simplepass
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
# This has to be over-ridden because
# it's not kept create rather kept none or validate after the first ddl creation.
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=create
# This is for FlyWay configuration
spring.flyway.url=jdbc:h2:mem:testdb
spring.flyway.schemas=testdb
spring.flyway.user=vslala
spring.flyway.password=simplepass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment