|
@@ -2,6 +2,7 @@ package com.usky.dxtop.framework.config;
|
|
|
|
|
|
import com.usky.dxtop.framework.interceptor.RepeatSubmitInterceptor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.web.servlet.MultipartConfigFactory;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.web.cors.CorsConfiguration;
|
|
@@ -11,6 +12,8 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
|
+import javax.servlet.MultipartConfigElement;
|
|
|
+
|
|
|
/**
|
|
|
* 通用配置
|
|
|
*
|
|
@@ -55,4 +58,12 @@ public class ResourcesConfig implements WebMvcConfigurer
|
|
|
source.registerCorsConfiguration("/**", config);
|
|
|
return new CorsFilter(source);
|
|
|
}
|
|
|
+
|
|
|
+ @Bean
|
|
|
+ public MultipartConfigElement multipartConfigElement() {
|
|
|
+ MultipartConfigFactory factory = new MultipartConfigFactory();
|
|
|
+ factory.setLocation("/app/service/dxtop/dxfile");
|
|
|
+ return factory.createMultipartConfig();
|
|
|
+ }
|
|
|
+
|
|
|
}
|