Commit df5ead6e authored by fangxinjiang's avatar fangxinjiang

附件上传限流-fxj

parent d7fe8c90
...@@ -264,8 +264,6 @@ public class FileUploadServiceImpl implements FileUploadService { ...@@ -264,8 +264,6 @@ public class FileUploadServiceImpl implements FileUploadService {
maxLimit = configLimitMapper.getSysConfigLimitByKey("UPLOAD_MAX_LIMIT"); maxLimit = configLimitMapper.getSysConfigLimitByKey("UPLOAD_MAX_LIMIT");
if (atomicInteger.incrementAndGet() <= maxLimit){ if (atomicInteger.incrementAndGet() <= maxLimit){
try { try {
atomicInteger.getAndAdd(1);
Thread.sleep(1000);
log.error("atomicInteger+1:"+atomicInteger.intValue()); log.error("atomicInteger+1:"+atomicInteger.intValue());
if (CommonConstants.ZERO_STRING.equals(uploadType)){ if (CommonConstants.ZERO_STRING.equals(uploadType)){
return uploadImg(file, filePath, type, domain); return uploadImg(file, filePath, type, domain);
......
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