From: Tang Cheng Date: Tue, 2 Jul 2019 07:48:18 +0000 (+0800) Subject: 测试 spring boot 启动工程 X-Git-Tag: 1.0.0^2~124 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=58094b35d1d76d6e405e6188a0d4b6e8411f902a;p=epayment%2Ffood_payapi.git 测试 spring boot 启动工程 --- diff --git a/build.gradle b/build.gradle index 00c9da33..ae777ffa 100644 --- a/build.gradle +++ b/build.gradle @@ -31,18 +31,11 @@ bootJar { mainClassName = startClass } -//war { -// enabled = true -// manifest { -//// attributes('Payapi-Version': rootProject.version) -//// attributes('Main-Class': 'org.springframework.boot.loader.WarLauncher') -//// attributes 'Start-Class': startClass -// } -//} - -//bootWar { -// launchScript() -//} +jar { + manifest { + attributes('Payapi-Version': rootProject.version) + } +} dependencies { diff --git a/src/main/kotlin/com/supwisdom/dlpay/PayApiApplication.kt b/src/main/kotlin/com/supwisdom/dlpay/PayApiApplication.kt index 0224ff94..a25fd95b 100644 --- a/src/main/kotlin/com/supwisdom/dlpay/PayApiApplication.kt +++ b/src/main/kotlin/com/supwisdom/dlpay/PayApiApplication.kt @@ -30,10 +30,10 @@ class AppConfig { @Value("\${redis.server}") lateinit var server: String - @Value("\${redis.port}") + @Value("\${redis.port:6379}") var port: Int = 0 - @Value("\${redis.database}") + @Value("\${redis.database:0}") var database: Int = 0 @Value("\${redis.password}") diff --git a/src/main/resources/META-INF/MANIFEST.MF b/src/main/resources/META-INF/MANIFEST.MF index 8b05d485..e69de29b 100644 --- a/src/main/resources/META-INF/MANIFEST.MF +++ b/src/main/resources/META-INF/MANIFEST.MF @@ -1,2 +0,0 @@ -Main-Class: org.springframework.boot.loader.WarLauncher -Start-Class: com.supwisdom.dlpay.PayApiApplication diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f0ec1142..e191f79e 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -8,9 +8,6 @@ spring.jpa.show-sql=true spring.datasource.hikari.connection-timeout=60000 spring.datasource.hikari.maximum-pool-size=5 spring.jpa.hibernate.ddl-auto=update -spring.flyway.locations=classpath:db/migration -spring.flyway.baseline-version=0 -spring.flyway.baseline-on-migrate=true # logging logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n logging.level.org.hibernate.SQL=debug