正在显示
1 个修改的文件
包含
8 行增加
和
1 行删除
| @@ -70,8 +70,15 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | @@ -70,8 +70,15 @@ public class SameUrlDataInterceptor extends RepeatSubmitInterceptor | ||
| 70 | // 请求地址(作为存放cache的key值) | 70 | // 请求地址(作为存放cache的key值) |
| 71 | String url = request.getRequestURI(); | 71 | String url = request.getRequestURI(); |
| 72 | 72 | ||
| 73 | + // 唯一值(没有消息头则使用请求地址) | ||
| 74 | + String submitKey = request.getHeader(header); | ||
| 75 | + if (StringUtils.isEmpty(submitKey)) | ||
| 76 | + { | ||
| 77 | + submitKey = url; | ||
| 78 | + } | ||
| 79 | + | ||
| 73 | // 唯一标识(指定key + 消息头) | 80 | // 唯一标识(指定key + 消息头) |
| 74 | - String cache_repeat_key = Constants.REPEAT_SUBMIT_KEY + request.getHeader(header); | 81 | + String cache_repeat_key = Constants.REPEAT_SUBMIT_KEY + submitKey; |
| 75 | 82 | ||
| 76 | Object sessionObj = redisCache.getCacheObject(cache_repeat_key); | 83 | Object sessionObj = redisCache.getCacheObject(cache_repeat_key); |
| 77 | if (sessionObj != null) | 84 | if (sessionObj != null) |
-
请 注册 或 登录 后发表评论