Procházet zdrojové kódy

chore: 更换服务端口避免冲突

- lingyue-starter: 5232 -> 18520
- lingyue-extract: 8086 -> 18521
- lingyue-ner: 8001 -> 18522
何文松 před 1 měsícem
rodič
revize
3f2ecdd5ee

+ 1 - 1
backend/extract-service/src/main/resources/application.properties

@@ -4,7 +4,7 @@
 # ===================================
 
 # 服务配置
-server.port=8086
+server.port=18521
 spring.application.name=extract-service
 
 # 数据库配置 (继承自 lingyue-starter 或独立配置)

+ 1 - 1
backend/lingyue-starter/src/main/resources/application.properties

@@ -6,7 +6,7 @@
 spring.config.import=optional:classpath:application-common.properties,optional:classpath:application-infra.properties
 
 # 服务端口
-server.port=5232
+server.port=18520
 server.servlet.context-path=/
 server.tomcat.uri-encoding=UTF-8
 server.tomcat.accept-count=1000

+ 1 - 1
frontend/vue-demo/README.md

@@ -60,7 +60,7 @@ npm run dev
 
 ### 3. 连接后端 API
 
-Vite 开发服务器已配置代理,将 `/api` 请求转发到 `http://localhost:8086`(extract-service)。
+Vite 开发服务器已配置代理,将 `/api` 请求转发到 `http://localhost:18521`(extract-service)。
 
 确保后端服务已启动:
 

+ 1 - 1
frontend/vue-demo/vite.config.js

@@ -7,7 +7,7 @@ import vue from '@vitejs/plugin-vue'
 // 
 // 修改下方 API_SERVER 变量即可切换
 
-const API_SERVER = process.env.API_SERVER || 'http://localhost:8086'
+const API_SERVER = process.env.API_SERVER || 'http://localhost:18521'
 
 export default defineConfig({
   plugins: [vue()],

+ 3 - 3
scripts/install-services.sh

@@ -79,6 +79,6 @@ echo "  停止服务: systemctl stop lingyue-starter"
 echo "  查看日志: journalctl -u lingyue-starter -f"
 echo ""
 echo "服务端口:"
-echo "  lingyue-starter: 5232"
-echo "  lingyue-extract: 8086"
-echo "  lingyue-ner:     8001"
+echo "  lingyue-starter: 18520"
+echo "  lingyue-extract: 18521"
+echo "  lingyue-ner:     18522"

+ 6 - 6
scripts/systemd/README.md

@@ -6,9 +6,9 @@
 
 | 服务文件 | 服务名 | 端口 | 说明 |
 |---------|--------|------|------|
-| `lingyue-starter.service` | lingyue-starter | 5232 | Java 主应用(单体启动器) |
-| `lingyue-extract.service` | lingyue-extract | 8086 | 模板系统服务 |
-| `lingyue-ner.service` | lingyue-ner | 8001 | NER Python 服务 |
+| `lingyue-starter.service` | lingyue-starter | 18520 | Java 主应用(单体启动器) |
+| `lingyue-extract.service` | lingyue-extract | 18521 | 模板系统服务 |
+| `lingyue-ner.service` | lingyue-ner | 18522 | NER Python 服务 |
 
 ## 安装步骤
 
@@ -116,13 +116,13 @@ sudo systemctl restart lingyue-starter
 
 ```bash
 # 主应用健康检查
-curl http://localhost:5232/actuator/health
+curl http://localhost:18520/actuator/health
 
 # 模板服务健康检查
-curl http://localhost:8086/api/v1/extract/health
+curl http://localhost:18521/api/v1/extract/health
 
 # NER 服务健康检查
-curl http://localhost:8001/health
+curl http://localhost:18522/health
 ```
 
 ## 一键脚本

+ 2 - 2
scripts/systemd/lingyue-extract.service

@@ -8,12 +8,12 @@ Type=simple
 User=root
 WorkingDirectory=/mnt/win_home/lingyue-zhibao/backend
 
-# Java 启动命令
+# Java 启动命令 (端口 18521)
 ExecStart=/usr/bin/java \
     -Xms512m -Xmx1g \
     -XX:+UseG1GC \
     -Dfile.encoding=UTF-8 \
-    -Dserver.port=8086 \
+    -Dserver.port=18521 \
     -jar extract-service/target/extract-service.jar
 
 # 重启策略

+ 2 - 2
scripts/systemd/lingyue-ner.service

@@ -8,11 +8,11 @@ Type=simple
 User=root
 WorkingDirectory=/mnt/win_home/lingyue-zhibao/python-services/ner-service
 
-# 使用虚拟环境启动
+# 使用虚拟环境启动 (端口 18522)
 ExecStart=/mnt/win_home/lingyue-zhibao/python-services/ner-service/venv/bin/uvicorn \
     app.main:app \
     --host 0.0.0.0 \
-    --port 8001
+    --port 18522
 
 # 重启策略
 Restart=always

+ 3 - 2
scripts/systemd/lingyue-starter.service

@@ -8,13 +8,14 @@ Type=simple
 User=root
 WorkingDirectory=/mnt/win_home/lingyue-zhibao/backend
 
-# Java 启动命令
+# Java 启动命令 (端口 18520)
 ExecStart=/usr/bin/java \
     -Xms1g -Xmx2g \
     -XX:+UseG1GC \
     -XX:+HeapDumpOnOutOfMemoryError \
     -XX:HeapDumpPath=/var/log/lingyue/heapdump.hprof \
     -Dfile.encoding=UTF-8 \
+    -Dserver.port=18520 \
     -jar lingyue-starter/target/lingyue-starter.jar
 
 # 重启策略
@@ -47,7 +48,7 @@ Environment=RABBITMQ_USERNAME=admin
 Environment=RABBITMQ_PASSWORD=admin123
 
 # NER 服务配置
-Environment=NER_SERVICE_URL=http://localhost:8001
+Environment=NER_SERVICE_URL=http://localhost:18522
 
 [Install]
 WantedBy=multi-user.target