| 
															
																@ -2,6 +2,7 @@ package com.yihu.jw.gateway.config; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.jw.gateway.filter.CsrfFilter; 
															 | 
															
															 | 
															
																import com.yihu.jw.gateway.filter.CsrfFilter; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.beans.factory.annotation.Autowired; 
															 | 
															
															 | 
															
																import org.springframework.beans.factory.annotation.Autowired; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import org.springframework.beans.factory.annotation.Value; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.boot.web.servlet.FilterRegistrationBean; 
															 | 
															
															 | 
															
																import org.springframework.boot.web.servlet.FilterRegistrationBean; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.boot.web.servlet.MultipartConfigFactory; 
															 | 
															
															 | 
															
																import org.springframework.boot.web.servlet.MultipartConfigFactory; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import org.springframework.context.annotation.Bean; 
															 | 
															
															 | 
															
																import org.springframework.context.annotation.Bean; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -19,10 +20,13 @@ public class MultipartConfig { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Autowired 
															 | 
															
															 | 
															
																    @Autowired 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    CsrfFilter csrfFilter; 
															 | 
															
															 | 
															
																    CsrfFilter csrfFilter; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @Value("${server.tomcat.basedir}") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    String tomcatLocation; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Bean 
															 | 
															
															 | 
															
																    @Bean 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    MultipartConfigElement multipartConfigElement() { 
															 | 
															
															 | 
															
																    MultipartConfigElement multipartConfigElement() { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        MultipartConfigFactory factory = new MultipartConfigFactory(); 
															 | 
															
															 | 
															
																        MultipartConfigFactory factory = new MultipartConfigFactory(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        String location = "/data/apps/temp"; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        String location = tomcatLocation; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        File tmpFile = new File(location); 
															 | 
															
															 | 
															
																        File tmpFile = new File(location); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        if (!tmpFile.exists()) { 
															 | 
															
															 | 
															
																        if (!tmpFile.exists()) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																            tmpFile.mkdirs(); 
															 | 
															
															 | 
															
																            tmpFile.mkdirs(); 
															 |