From bbb1b74f122affa814224dd2c9e5fb4ddcfcbe5a Mon Sep 17 00:00:00 2001
From: 郑永安 <zyazyz250@sina.com>
Date: Mon, 04 Sep 2023 17:48:14 +0800
Subject: [PATCH] 添加字段
---
src/main/java/com/gk/hotwork/Config/Cors/MyMvcConfigurer.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/gk/hotwork/Config/Cors/MyMvcConfigurer.java b/src/main/java/com/gk/hotwork/Config/Cors/MyMvcConfigurer.java
index 8e6113b..784c898 100644
--- a/src/main/java/com/gk/hotwork/Config/Cors/MyMvcConfigurer.java
+++ b/src/main/java/com/gk/hotwork/Config/Cors/MyMvcConfigurer.java
@@ -1,5 +1,6 @@
package com.gk.hotwork.Config.Cors;
+import com.gk.hotwork.Config.attachment.FilePathConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
@@ -30,6 +31,12 @@
private String taskPath;
@Value("${emergencyPlanPath}")
private String emergencyPlanPath;
+
+ @Value("${file.path.dcPath}")
+ private String dcPath;
+
+ @Value("${file.path.urlRootPath}")
+ private String urlRootPath;
@Override
@@ -67,5 +74,7 @@
.addResourceLocations("file:" + taskPath);
registry.addResourceHandler("/upload/emergencyPlan/**")
.addResourceLocations("file:" + emergencyPlanPath);
+ registry.addResourceHandler("/uploadfile/**")
+ .addResourceLocations("file:" + dcPath);
}
}
--
Gitblit v1.9.2