소스 검색

请求大小

lyhzzz 2 년 전
부모
커밋
4f890a0d2f
2개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/java/com/fdkankan/manage_jp/service/impl/CompanyServiceImpl.java
  2. 6 0
      src/main/resources/bootstrap.yml

+ 1 - 1
src/main/java/com/fdkankan/manage_jp/service/impl/CompanyServiceImpl.java

@@ -69,8 +69,8 @@ public class CompanyServiceImpl extends ServiceImpl<ICompanyMapper, Company> imp
         if(!ObjectUtils.isEmpty(userEntity)){
             throw new BusinessException(ResultCode.USER_EXIST);
         }
-        entity.setState(1);
         BeanUtils.copyProperties(param, entity);
+        entity.setState(1);
         entity.setAuditTime(new Date());
         this.save(entity);
 

+ 6 - 0
src/main/resources/bootstrap.yml

@@ -1,4 +1,10 @@
 spring:
+  servlet:
+    multipart:
+      #       设置单个文件大小
+      max-file-size: 20MB
+      #       设置单次请求文件的总大小
+      max-request-size: 50MB
   profiles:
     active: test
 logging: