优化防重复提交拦截器,非JSON格式不获取Body消息体
This commit is contained in:
parent
5901fc6610
commit
8bbe60975a
@ -53,8 +53,7 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor
|
|||||||
public boolean isRepeatSubmit(HttpServletRequest request)
|
public boolean isRepeatSubmit(HttpServletRequest request)
|
||||||
{
|
{
|
||||||
String nowParams = "";
|
String nowParams = "";
|
||||||
if (request instanceof HttpServletRequest && StringUtils.equalsAnyIgnoreCase(request.getContentType(),
|
if (request instanceof RepeatedlyRequestWrapper)
|
||||||
MediaType.APPLICATION_JSON_VALUE, MediaType.APPLICATION_JSON_UTF8_VALUE))
|
|
||||||
{
|
{
|
||||||
RepeatedlyRequestWrapper repeatedlyRequest = (RepeatedlyRequestWrapper) request;
|
RepeatedlyRequestWrapper repeatedlyRequest = (RepeatedlyRequestWrapper) request;
|
||||||
nowParams = HttpHelper.getBodyString(repeatedlyRequest);
|
nowParams = HttpHelper.getBodyString(repeatedlyRequest);
|
||||||
|
Loading…
Reference in New Issue
Block a user