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);