Default Hibernate DDL auto to none with Flyway/Liquibase

This commit adds a strategy interface to specific if a given DataSource
has its schema managed. The Hibernate auto-configuration uses it to set
it to "none" if a mechanism to initialize the DataSource is
found and "create-drop" otherwise.

Both Flyway and Liquibase implements that strategy interface and
register it in the context accordingly.

Closes gh-9262
This commit is contained in:
Stephane Nicoll
2017-08-21 17:48:42 +02:00
parent 8babd5d4c5
commit afda0ec129
18 changed files with 427 additions and 78 deletions

View File

@@ -1,5 +1,3 @@
management.security.enabled=false
spring.jpa.hibernate.ddl-auto=none
spring.h2.console.enabled=true