From 193fed29b2c829f4a29c3f80ab0be64167738db2 Mon Sep 17 00:00:00 2001 From: msksbr515 Date: Thu, 21 May 2026 14:30:52 +0800 Subject: [PATCH] fix(build): use bootJar task for production packaging - Use bootJar instead of processResources for excluding dev configuration - Set default time-zone to GMT for JSON serialization --- build.gradle.kts | 7 ++++--- src/main/resources/application.yaml | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 48dee34..9a5de11 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,7 +48,8 @@ tasks.withType { useJUnitPlatform() } -// 打包时排除dev环境配置 -tasks.named("processResources") { +// 生产打包时排除dev环境配置 +tasks.bootJar { exclude("application-dev.yaml") -} \ No newline at end of file +} + diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 6491c19..973d8c6 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -10,7 +10,7 @@ spring: default-property-inclusion: non_null property-naming-strategy: SNAKE_CASE date-format: ${JSON_DATE_FORMAT:} - time-zone: ${JSON_TIME_ZONE:} + time-zone: ${JSON_TIME_ZONE:GMT} mybatis-plus: configuration: