| | |
| | | package com.ruoyi.framework.interceptor.impl;
|
| | |
|
| | | import cn.hutool.core.io.IoUtil; |
| | | import cn.hutool.core.lang.Validator;
|
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.ruoyi.common.constant.Constants;
|
| | | import com.ruoyi.common.core.redis.RedisCache;
|
| | | import com.ruoyi.common.filter.RepeatedlyRequestWrapper;
|
| | | import com.ruoyi.common.utils.http.HttpHelper;
|
| | | import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor;
|
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | | import java.io.IOException; |
| | | import java.util.HashMap;
|
| | | import java.util.Map;
|
| | | import java.util.concurrent.TimeUnit;
|
| | |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | @Slf4j |
| | | @Component
|
| | | public class SameUrlDataInterceptor extends RepeatSubmitInterceptor
|
| | | {
|
| | |
| | | if (request instanceof RepeatedlyRequestWrapper)
|
| | | {
|
| | | RepeatedlyRequestWrapper repeatedlyRequest = (RepeatedlyRequestWrapper) request;
|
| | | nowParams = HttpHelper.getBodyString(repeatedlyRequest);
|
| | | try { |
| | | nowParams = IoUtil.readUtf8(repeatedlyRequest.getInputStream()); |
| | | } catch (IOException e) { |
| | | log.warn("读取流出现问题!"); |
| | | } |
| | | }
|
| | |
|
| | | // body参数为空,获取Parameter的数据
|