|
|
@@ -1,28 +0,0 @@
|
|
|
-package com.uas.sso;
|
|
|
-
|
|
|
-import org.springframework.boot.web.servlet.MultipartConfigFactory;
|
|
|
-import org.springframework.context.annotation.Bean;
|
|
|
-import org.springframework.context.annotation.Configuration;
|
|
|
-
|
|
|
-import javax.servlet.MultipartConfigElement;
|
|
|
-import java.io.File;
|
|
|
-
|
|
|
-/**
|
|
|
- * @author liusw
|
|
|
- * @date 2019-03-06 08:59
|
|
|
- */
|
|
|
-@Configuration
|
|
|
-public class MultipartConfig {
|
|
|
-
|
|
|
- @Bean
|
|
|
- MultipartConfigElement multipartConfigElement() {
|
|
|
- MultipartConfigFactory factory = new MultipartConfigFactory();
|
|
|
- String location = "tmp";
|
|
|
- File tmpFile = new File(location);
|
|
|
- if (!tmpFile.exists()) {
|
|
|
- tmpFile.mkdirs();
|
|
|
- }
|
|
|
- factory.setLocation(location);
|
|
|
- return factory.createMultipartConfig();
|
|
|
- }
|
|
|
-}
|