@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
String tokenValue = request.getParameter(FORM_TOKEN);
HandlerMethod handlerMethod = (HandlerMethod) handler;
Method method = handlerMethod.getMethod();
boolean isDuplicateSubmitType = method.isAnnotationPresent(DuplicateSubmit.class);
if (isDuplicateSubmitType) {
long result = cacheManager.increment(tokenValue);
cacheManager.setString(tokenValue, "1", 5000);
// 判断返回值是否大于1,如果是则重复提交
if (result > 1) {
LOGGER.error("【" + request.getRequestURL() + "==>" + method.getName() + "】" + "的方法表单重复提交");
response.setCharacterEncoding("utf-8");
response.setContentType("text/html&#