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 bdf89511b7375e2a98c3a6413c33af4fee2fd18c..12d0752d673c715def77c98cb7e3a3d01a6a0fa4 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 466d23af7b02969fe5f36cd86d26ce6fe66e727d..02d7ee2e6f785af8469eee47246805093313d4a2 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:}