|
|
@@ -2,7 +2,9 @@ package com.uas.sso;
|
|
|
|
|
|
import com.uas.sso.util.ContextUtils;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
+import org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration;
|
|
|
import org.springframework.boot.context.event.ApplicationPreparedEvent;
|
|
|
import org.springframework.boot.web.servlet.MultipartConfigFactory;
|
|
|
import org.springframework.context.ApplicationListener;
|
|
|
@@ -45,16 +47,4 @@ public class SsoApplication {
|
|
|
});
|
|
|
application.run(args);
|
|
|
}
|
|
|
-
|
|
|
- @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();
|
|
|
- }
|
|
|
}
|