From 96ad148e1ee859c2708a0ec7194f742fdb611a2c Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 24 Jun 2022 10:20:55 +0800
Subject: [PATCH] fix

---
 src/main/java/com/xcong/farmer/cms/configurations/WebMvcConfig.java |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/farmer/cms/configurations/WebMvcConfig.java b/src/main/java/com/xcong/farmer/cms/configurations/WebMvcConfig.java
index 86faea6..65506ef 100644
--- a/src/main/java/com/xcong/farmer/cms/configurations/WebMvcConfig.java
+++ b/src/main/java/com/xcong/farmer/cms/configurations/WebMvcConfig.java
@@ -1,11 +1,16 @@
 package com.xcong.farmer.cms.configurations;
 
+import com.xcong.farmer.cms.common.contants.AppContants;
+import com.xcong.farmer.cms.configurations.properties.ApplicationProperties;
 import com.xcong.farmer.cms.utils.SpringContextHolder;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.SpringBootConfiguration;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
 import org.springframework.web.servlet.config.annotation.CorsRegistry;
 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 /**
@@ -37,4 +42,16 @@
     public SpringContextHolder springContextHolder() {
         return new SpringContextHolder();
     }
+
+//    @Value("${upload.file.location}")
+//    private String fileLocation;
+//    @Value("${upload.file.path}")
+//    private String filePath;
+//    @Override
+//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+//        //注册配置类,使用addResourceHandlers方法,将本地路径savePath映射到saveUrl路由上。
+//        registry.addResourceHandler(filePath).addResourceLocations(fileLocation);
+//        WebMvcConfigurer.super.addResourceHandlers(registry);
+//    }
+
 }

--
Gitblit v1.9.1