From 09ab5b98e69e642b3b11a02fe060e644ff80245b Mon Sep 17 00:00:00 2001 From: divenswu Date: Tue, 18 Jul 2023 10:03:56 +0800 Subject: [PATCH] =?UTF-8?q?update:=20application-docker.yml=E9=92=88?= =?UTF-8?q?=E5=AF=B9=E8=AF=BB=E5=8F=96=E5=88=B0=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../face/search/server/bootstrap/conf/ModelConfig.java | 5 ++++- face-search-server/src/main/resources/application-docker.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/face-search-server/src/main/java/com/visual/face/search/server/bootstrap/conf/ModelConfig.java b/face-search-server/src/main/java/com/visual/face/search/server/bootstrap/conf/ModelConfig.java index bdf8951..12d0752 100755 --- a/face-search-server/src/main/java/com/visual/face/search/server/bootstrap/conf/ModelConfig.java +++ b/face-search-server/src/main/java/com/visual/face/search/server/bootstrap/conf/ModelConfig.java @@ -179,7 +179,10 @@ public class ModelConfig { private String[] getModelPath(String modelName, String modelPath[]){ String basePath = "face-search-core/src/main/resources/"; if(StringUtils.isNotEmpty(this.baseModelPath)){ - basePath = this.baseModelPath.endsWith("/") ? this.baseModelPath : this.baseModelPath +"/"; + basePath = this.baseModelPath; + basePath = basePath.replaceAll("^\'|\'$", ""); + basePath = basePath.replaceAll("^\"|\"$", ""); + basePath = basePath.endsWith("/") ? basePath : basePath +"/"; } if((null == modelPath || modelPath.length != 3) && "PcnNetworkFaceDetection".equalsIgnoreCase(modelName)){ diff --git a/face-search-server/src/main/resources/application-docker.yml b/face-search-server/src/main/resources/application-docker.yml index 466d23a..02d7ee2 100755 --- a/face-search-server/src/main/resources/application-docker.yml +++ b/face-search-server/src/main/resources/application-docker.yml @@ -22,7 +22,7 @@ logging: # 模型配置 visual: model: - baseModelPath: ${VISUAL_MODEL_BASE_MODEL_PATH:'/app/face-search/'} + baseModelPath: ${VISUAL_MODEL_BASE_MODEL_PATH:/app/face-search/} faceDetection: name: ${VISUAL_MODEL_FACEDETECTION_NAME:InsightScrfdFaceDetection} modelPath: ${VISUAL_MODEL_FACEDETECTION_PATH:}