Exception : PreFlightHandler can not casting
Spring Interceptor에서 PreFlight Request (CORS 인식을 위한 OPTIONS 요청)에 대해서 HandlerMethod로 케스팅 한 경우 발생. 해결 방법은 instanceof로 체크 하면 됨 ---- 관련 자료) PreFlightHandler 클래스 private class PreFlightHandler implements HttpRequestHandler { private final CorsConfiguration config ; public PreFlightHandler(CorsConfiguration config ) { this . config = config ; } @Override public void handleRequest(HttpServletRequest request , HttpServletResponse response ) throws IOException { corsProcessor .processRequest( this . config , request , response ); } } PreFlightHandler를 사용하는 메소드 AbstractHandlerMapping.getCorsHandlerExecutionChain Update the HandlerExecutionChain for CORS-related handling. For pre-flight requests, the default implementation replaces the selected handler with a simple HttpRequestHandler that invokes the configured setCorsProcessor(org.springframework.web.cors.CorsProcessor) . For actual requests, the default impleme...