Created
May 22, 2020 13:08
-
-
Save vslala/d412156e5840fafa1b9f61aae5b20951 to your computer and use it in GitHub Desktop.
Configuration for running integration tests with H2 Database, Flyway, Spring Boot JPA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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