生产环境未保留方法参数名时 Spring 无法绑定 @RequestParam/@PathVariable,补齐注解名称并在 Maven 编译中强制 -parameters;同时优化走访、勤工助学、请假和宿舍点名页交互。 Co-authored-by: Cursor <cursoragent@cursor.com>
19 lines
514 B
Bash
Executable File
19 lines
514 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 生产环境打包脚本
|
|
# 强制保留方法参数名,避免 Spring 在生产环境无法绑定请求参数
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
echo "==> 开始生产打包: mvn clean package -Pprod -Dmaven.compiler.parameters=true"
|
|
mvn clean package -Pprod -Dmaven.compiler.parameters=true "$@"
|
|
|
|
JAR="ruoyi-admin/target/ruoyi-admin.jar"
|
|
if [[ -f "$JAR" ]]; then
|
|
echo "==> 打包成功: $JAR"
|
|
ls -lh "$JAR"
|
|
else
|
|
echo "==> 未找到 $JAR,请检查构建日志" >&2
|
|
exit 1
|
|
fi
|