liubing 2 лет назад
Родитель
Сommit
644bea4506

+ 5 - 1
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/MultipartConfig.java

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

+ 1 - 1
gateway/ag-basic/src/main/resources/application.yml

@ -1,7 +1,7 @@
server:
  port: ${server.ag-basic-port}
  tomcat:
    basedir: /data/apps/temp
    basedir: /data1/apps/temp1
    max-http-form-post-size: -1
  max-http-header-size: 102400

+ 6 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/config/MultipartConfig.java

@ -1,5 +1,6 @@
package com.yihu.jw.base.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -12,10 +13,14 @@ import java.io.*;
@Configuration
public class MultipartConfig {
    @Value("${server.tomcat.basedir}")
    String tomcatLocation;
    @Bean
    MultipartConfigElement multipartConfigElement() {
        MultipartConfigFactory factory = new MultipartConfigFactory();
        String location = "/data/apps/temp2";
        String location = tomcatLocation;
        File tmpFile = new File(location);
        if (!tmpFile.exists()) {
            tmpFile.mkdirs();

+ 1 - 1
svr/svr-base/src/main/resources/application.yml

@ -2,7 +2,7 @@
server:
  port: ${server.svr-base-port}
  tomcat:
    basedir: /data/apps/temp2
    basedir: /data1/apps/temp2
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL