From 2c80f1eec846c5367bd845580e52cd9fec7596d4 Mon Sep 17 00:00:00 2001 From: Wonder Date: Sat, 1 Nov 2025 12:05:35 +0800 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=90=9BFix:=20SpringBoot=20=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/pom.xml | 6 +----- deploy.sh | 6 +++++- lark/pom.xml | 15 +++++++-------- movie/pom.xml | 13 +++++++------ pom.xml | 35 +++++++++++++++++++++++++++-------- weather/pom.xml | 13 +++++++------ 6 files changed, 54 insertions(+), 34 deletions(-) diff --git a/common/pom.xml b/common/pom.xml index 17ce991..09a4013 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -10,6 +10,7 @@ common + jar @@ -30,11 +31,6 @@ org.apache.maven.plugins maven-compiler-plugin - 3.11.0 - - 21 - 21 - diff --git a/deploy.sh b/deploy.sh index 2a12c8b..d850d7e 100644 --- a/deploy.sh +++ b/deploy.sh @@ -28,7 +28,7 @@ if [ $? -ne 0 ]; then fi # 进入工作目录 -cd $WORK_DIR +cd "$WORK_DIR" || { echo "无法进入工作目录"; exit 1; } # 打包各个模块 echo "正在打包各个模块..." @@ -58,6 +58,10 @@ if [ $? -ne 0 ]; then exit 1 fi +# 清理旧部署文件 +echo "清理旧部署文件..." +rm -f "$DEPLOY_DIR/lark.jar" "$DEPLOY_DIR/movie.jar" "$DEPLOY_DIR/weather.jar" + # 复制jar包到部署目录 echo "复制jar包到部署目录..." cp movie/target/movie-*.jar $DEPLOY_DIR/movie.jar diff --git a/lark/pom.xml b/lark/pom.xml index d56ab23..45d6d1c 100644 --- a/lark/pom.xml +++ b/lark/pom.xml @@ -12,6 +12,13 @@ lark + + cn.hezhaohui + common + 1.0.0 + compile + + org.springframework.boot spring-boot-starter-web @@ -38,13 +45,6 @@ org.projectlombok lombok - - - cn.hezhaohui - common - 1.0.0 - compile - @@ -60,7 +60,6 @@ spring-boot-maven-plugin cn.hezhaohui.lark.LarkApplication - true diff --git a/movie/pom.xml b/movie/pom.xml index 8b71f50..1fa87f3 100644 --- a/movie/pom.xml +++ b/movie/pom.xml @@ -12,6 +12,12 @@ movie + + cn.hezhaohui + common + 1.0.0 + + org.springframework.boot spring-boot-starter-web @@ -24,11 +30,7 @@ com.mysql mysql-connector-j - - cn.hezhaohui - common - 1.0.0 - + org.projectlombok lombok @@ -52,7 +54,6 @@ spring-boot-maven-plugin cn.hezhaohui.movie.MovieApplication - true diff --git a/pom.xml b/pom.xml index e21a59f..9ac58bd 100644 --- a/pom.xml +++ b/pom.xml @@ -53,14 +53,33 @@ - - - - org.springframework.boot - spring-boot-maven-plugin - 3.2.2 - - + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + 21 + 21 + utf-8 + + + + + org.springframework.boot + spring-boot-maven-plugin + 3.2.2 + + + + repackage + + + + + + diff --git a/weather/pom.xml b/weather/pom.xml index 8885f54..aac67e6 100644 --- a/weather/pom.xml +++ b/weather/pom.xml @@ -12,6 +12,12 @@ weather + + cn.hezhaohui + common + 1.0.0 + + org.springframework.boot spring-boot-starter-web @@ -33,11 +39,7 @@ hutool-all 5.8.27 - - cn.hezhaohui - common - 1.0.0 - + org.springframework.boot spring-boot-starter-test @@ -57,7 +59,6 @@ spring-boot-maven-plugin cn.hezhaohui.weather.WeatherApplication - true