Commit 1132c048 authored by m1991's avatar m1991

资讯模块——邀请码过滤特殊字符功能功能修复

parent 77daa080
......@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
......@@ -14,6 +15,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@SpringBootApplication(exclude = {MultipartAutoConfiguration.class})
@EnableSwagger2
@EnableScheduling
@Configuration
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
......
package cn.wisenergy.web.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
/**
* 文件上传配置
*
* @author wyy
* @date 2019-08-22 19:20
*/
//@Configuration
//public class FileUploadConfig {
//
// /**
// * 重新定义文件上传对象【springBoot request转化成MultipartHttpServletRequest】
// */
// @Bean(name = "multipartResolver")
// public MultipartResolver multipartResolver() {
// CommonsMultipartResolver resolver = new CommonsMultipartResolver();
// resolver.setDefaultEncoding("UTF-8");
// resolver.setResolveLazily(true);
// resolver.setMaxInMemorySize(1024 * 1024 * 1024);
// resolver.setMaxUploadSize(1024 * 1024 * 1024);
// resolver.setMaxUploadSizePerFile(1024 * 1024 * 1024);
// return resolver;
// }
//
//}
@Configuration
public class FileUploadConfig {
/**
* 重新定义文件上传对象【springBoot request转化成MultipartHttpServletRequest】
*/
@Bean(name = "multipartResolver")
public MultipartResolver multipartResolver() {
CommonsMultipartResolver resolver = new CommonsMultipartResolver();
resolver.setDefaultEncoding("UTF-8");
resolver.setResolveLazily(true);
resolver.setMaxInMemorySize(1024 * 1024 * 1024);
resolver.setMaxUploadSize(1024 * 1024 * 1024);
resolver.setMaxUploadSizePerFile(1024 * 1024 * 1024);
return resolver;
}
}
spring:
main:
allow-bean-definition-overriding: true
# jackson时间格式化
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
servlet:
multipart:
max-file-size: 1024MB
max-request-size: 2048MB
enabled: true
mvc:
throw-exception-if-no-handler-found: true
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
......
spring:
main:
allow-bean-definition-overriding: true
# jackson时间格式化
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
servlet:
multipart:
max-file-size: 1024MB
max-request-size: 2048MB
enabled: true
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
......@@ -32,6 +43,7 @@ spring:
wall:
config:
multi-statement-allow: true
#/www/server/redis/src/redis-server
redis:
open: false # 是否开启redis缓存 true开启 false关闭
......
......@@ -6,6 +6,8 @@ server:
min-spare: 30
max-swallow-size: 1024MB
max-http-form-post-size: 1024MB
# 1 073 741 824
port: 8997
servlet:
context-path: /shop-mall
......@@ -25,7 +27,6 @@ spring:
max-file-size: 1024MB
max-request-size: 2048MB
enabled: true
resolve-lazily: true
mvc:
throw-exception-if-no-handler-found: true
# resources:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment