正在显示
1 个修改的文件
包含
3 行增加
和
7 行删除
| @@ -60,14 +60,10 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | @@ -60,14 +60,10 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | ||
| 60 | String url = request.getRequestURI(); | 60 | String url = request.getRequestURI(); |
| 61 | 61 | ||
| 62 | // 唯一值(没有消息头则使用请求地址) | 62 | // 唯一值(没有消息头则使用请求地址) |
| 63 | - String submitKey = request.getHeader(header); | ||
| 64 | - if (StringUtils.isEmpty(submitKey)) | ||
| 65 | - { | ||
| 66 | - submitKey = url; | ||
| 67 | - } | 63 | + String submitKey = StringUtils.trimToEmpty(request.getHeader(header)); |
| 68 | 64 | ||
| 69 | - // 唯一标识(指定key + 消息头) | ||
| 70 | - String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + submitKey; | 65 | + // 唯一标识(指定key + url + 消息头) |
| 66 | + String cacheRepeatKey = Constants.REPEAT_SUBMIT_KEY + url + submitKey; | ||
| 71 | 67 | ||
| 72 | Object sessionObj = redisCache.getCacheObject(cacheRepeatKey); | 68 | Object sessionObj = redisCache.getCacheObject(cacheRepeatKey); |
| 73 | if (sessionObj != null) | 69 | if (sessionObj != null) |
-
请 注册 或 登录 后发表评论