WANG 6 年之前
父节点
当前提交
d69807021f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/java/cn/com/qmth/examcloud/web/interceptor/FirstInterceptor.java

+ 2 - 1
src/main/java/cn/com/qmth/examcloud/web/interceptor/FirstInterceptor.java

@@ -82,7 +82,8 @@ public class FirstInterceptor implements HandlerInterceptor {
 			return false;
 		}
 
-		if (handler instanceof HandlerMethod) {
+		if ((!org.springframework.http.HttpMethod.OPTIONS.matches(method))
+				&& handler instanceof HandlerMethod) {
 			HandlerMethod handlerMethod = (HandlerMethod) handler;
 			ApiId apiId = handlerMethod.getMethodAnnotation(ApiId.class);