From a0045f97d99b808ac6eef263a988610bb376a5fc Mon Sep 17 00:00:00 2001 From: Tang Cheng Date: Wed, 24 Apr 2019 14:41:34 +0800 Subject: [PATCH] =?utf8?q?=E6=9B=B4=E6=96=B0flway?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- build.gradle | 1 + src/main/resources/application.properties | 2 ++ .../resources/{data.sql => db/migration/V1_0-init_data.sql} | 0 3 files changed, 3 insertions(+) rename src/main/resources/{data.sql => db/migration/V1_0-init_data.sql} (100%) diff --git a/build.gradle b/build.gradle index b5f6ed86..7cd37f7e 100644 --- a/build.gradle +++ b/build.gradle @@ -48,6 +48,7 @@ dependencies { implementation group: 'javax.servlet', name: 'jstl', version: '1.2' implementation group: 'taglibs', name: 'standard', version: '1.1.2' implementation group: 'commons-codec', name: 'commons-codec', version: '1.6' + implementation 'org.flywaydb:flyway-core' // implementation group: 'javax.servlet.jsp', name: 'jsp-api', version: '2.1' implementation group: 'log4j', name: 'log4j', version: '1.2.16' implementation files('libs/ojdbc6.jar') diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 41f55329..afe6400d 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -6,6 +6,8 @@ spring.datasource.hikari.maximum-pool-size=5 spring.datasource.initialization-mode=always spring.datasource.continue-on-error=true spring.jpa.hibernate.ddl-auto=update + +spring.flyway.locations=classpath:db/migration # logging logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n logging.level.org.hibernate.SQL=debug diff --git a/src/main/resources/data.sql b/src/main/resources/db/migration/V1_0-init_data.sql similarity index 100% rename from src/main/resources/data.sql rename to src/main/resources/db/migration/V1_0-init_data.sql -- 2.17.1