fix: 统一启动脚本端口配置为 8480

- 修改 start-all.sh: 端口检查、健康检查使用 8480
- 修改 stop-all.sh: 停止后端服务使用 8480
- 与 application.yml 中的 SERVER_PORT:8480 保持一致

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude Opus 4.6 2026-03-20 09:55:35 +08:00
parent a054c410c2
commit a31921f27f
2 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ check_port() {
} }
# 检查并停止占用端口的进程 # 检查并停止占用端口的进程
check_port 8080 "后端" check_port 8480 "后端"
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
echo "❌ 后端启动取消" echo "❌ 后端启动取消"
exit 1 exit 1
@ -73,7 +73,7 @@ echo "📄 日志文件:/tmp/reading-platform-java.log"
# 等待后端启动 # 等待后端启动
echo "⏳ 等待后端服务启动..." echo "⏳ 等待后端服务启动..."
for i in {1..60}; do for i in {1..60}; do
if curl -s http://localhost:8080/actuator/health > /dev/null 2>&1; then if curl -s http://localhost:8480/actuator/health > /dev/null 2>&1; then
echo "✅ 后端服务就绪" echo "✅ 后端服务就绪"
break break
fi fi
@ -122,9 +122,9 @@ echo "======================================"
echo " ✅ 所有服务启动成功!" echo " ✅ 所有服务启动成功!"
echo "======================================" echo "======================================"
echo "" echo ""
echo "📍 后端 API: http://localhost:8080" echo "📍 后端 API: http://localhost:8480"
echo "📍 前端页面: http://localhost:5173" echo "📍 前端页面: http://localhost:5173"
echo "📍 API 文档: http://localhost:8080/api/v1" echo "📍 API 文档: http://localhost:8480/api/v1"
echo "" echo ""
echo "📊 查看后端日志tail -f /tmp/reading-platform-java.log" echo "📊 查看后端日志tail -f /tmp/reading-platform-java.log"
echo "📊 查看前端日志tail -f /tmp/reading-platform-frontend.log" echo "📊 查看前端日志tail -f /tmp/reading-platform-frontend.log"

View File

@ -9,8 +9,8 @@ echo ""
# 停止后端 # 停止后端
echo "🛑 停止后端服务 (Spring Boot)..." echo "🛑 停止后端服务 (Spring Boot)..."
if lsof -ti:8080 > /dev/null 2>&1; then if lsof -ti:8480 > /dev/null 2>&1; then
lsof -ti:8080 | xargs kill -9 2>/dev/null lsof -ti:8480 | xargs kill -9 2>/dev/null
echo "✅ 后端服务已停止" echo "✅ 后端服务已停止"
else else
echo " 后端服务未运行" echo " 后端服务未运行"