revert run-app.sh to clean (yh-auth re-deployed to Nexus now provides yh.sso->serverName mapping; no hardcoded -D needed)
ci-userbase-service / build-and-push (push) Successful in 38s

This commit is contained in:
2026-08-10 11:18:53 +08:00
parent 6eea4ddfb8
commit b083aa2cb2
+1 -10
View File
@@ -6,14 +6,5 @@ set -e
echo "[run-app] starting UserBase (profile=prod, nacos=${NACOS_ADDR:-nacos.yunhaixingtong.com:8848}) ..."
# 防御性保证 CAS 校验过滤器(yh-auth 的 cas20ProxyReceivingTicketValidationFilter)所需的
# yh.sso 属性。该过滤器从 yh.sso.client-host-url 派生 serverName(去掉上下文路径),而 yh-auth 在
# Spring Cloud + Nacos 环境下对 yh.sso.* 的宽松绑定偶尔返回 null,导致过滤器 init 抛
# "serverName or service must be set"、Tomcat 上下文启动失败。
# 这里用 JVM 系统属性强制注入:environment.getProperty 必能取到,优先级高于 Nacos/common.yaml 同名项,
# 后续若 Nacos prod 正确配置 yh.sso.* 仍可覆盖,不影响 Nacos 化。
exec java ${JAVA_OPTS:--Xms512m -Xmx1024m} -Dfile.encoding=UTF-8 \
-Dyh.sso.server-url-prefix=http://sso.yunhaixingtong.com \
-Dyh.sso.client-host-url=http://www.yunhaixingtong.com/userbase \
-jar /app/userbase.jar \
exec java ${JAVA_OPTS:--Xms512m -Xmx1024m} -Dfile.encoding=UTF-8 -jar /app/userbase.jar \
--spring.profiles.active=prod