调整fastAPI后端:docker增加zxing需要的jar包;优化代码内容;

This commit is contained in:
BBIT-Kai
2025-09-26 16:24:15 +08:00
parent 019a4365ed
commit a10fb27779
3 changed files with 14 additions and 8 deletions
+12 -8
View File
@@ -26,13 +26,17 @@ app.add_middleware(
allow_methods=["*"], # 必须包含 OPTIONS、GET 等 allow_methods=["*"], # 必须包含 OPTIONS、GET 等
allow_headers=["*"], allow_headers=["*"],
) )
app.include_router(chatRouter, prefix="/api/llm", tags=["llm"]) routers = [
app.include_router(reportRouter, prefix="/api/llm", tags=["llm"]) chatRouter,
app.include_router(knowledgeRouter, prefix="/api/llm", tags=["llm"]) reportRouter,
app.include_router(reportDataRouter, prefix="/api/llm", tags=["llm"]) knowledgeRouter,
app.include_router(serviceRouter, prefix="/api/llm", tags=["llm"]) reportDataRouter,
app.include_router(botRouter, prefix="/api/llm", tags=["llm"]) serviceRouter,
app.include_router(visionRouter, prefix="/api/llm", tags=["llm"]) botRouter,
visionRouter,
]
for r in routers:
app.include_router(r, prefix="/llm", tags=["llm"])
app.include_router(f8Router, prefix="/api/f8", tags=["f8"]) app.include_router(f8Router, prefix="/f8", tags=["f8"])
+2
View File
@@ -34,6 +34,8 @@ ENV PATH="$JAVA_HOME/bin:$PATH"
# 复制项目代码 # 复制项目代码
COPY app/ . COPY app/ .
# 复制 pyzxing 的 jar 文件到默认路径
COPY docker/javase-3.4.1-SNAPSHOT-jar-with-dependencies.jar /root/.local/pyzxing/javase-3.4.1-SNAPSHOT-jar-with-dependencies.jar
EXPOSE 13011 EXPOSE 13011