/** * Look up a handler method for the given request. */ @Override protected HandlerMethod getHandlerInternal(HttpServletRequest request) throws Exception { String lookupPath = getUrlPathHelper().getLookupPathForRequest(request); this.mappingRegistry.acquireReadLock(); try { HandlerMethod handlerMethod = lookupHandlerMethod(lookupPath, request); return (handlerMethod != null ? handlerMethod.createWithResolvedBean() : null); } finally { this.mappingRegistry.releaseReadLock(); } }
/** * Look up a handler method for the given request. * @param exchange the current exchange */ @Override public Mono<HandlerMethod> getHandlerInternal(ServerWebExchange exchange) { this.mappingRegistry.acquireReadLock(); try { HandlerMethod handlerMethod; try { handlerMethod = lookupHandlerMethod(exchange); } catch (Exception ex) { return Mono.error(ex); } if (handlerMethod != null) { handlerMethod = handlerMethod.createWithResolvedBean(); } return Mono.justOrEmpty(handlerMethod); } finally { this.mappingRegistry.releaseReadLock(); } }
/** * Look up a handler method for the given request. */ @Override protected HandlerMethod getHandlerInternal(HttpServletRequest request) throws Exception { String lookupPath = getUrlPathHelper().getLookupPathForRequest(request); this.mappingRegistry.acquireReadLock(); try { HandlerMethod handlerMethod = lookupHandlerMethod(lookupPath, request); return (handlerMethod != null ? handlerMethod.createWithResolvedBean() : null); } finally { this.mappingRegistry.releaseReadLock(); } }
@Override public HandlerMethod createWithResolvedBean() { HandlerMethod handlerMethod = super.createWithResolvedBean(); return new WebFluxEndpointHandlerMethod(handlerMethod.getBean(), handlerMethod.getMethod()); }
@Override public Object getController() { Object controller = getHandler(); if ((controller != null) && (controller instanceof HandlerMethod)) { controller = ((HandlerMethod) controller).createWithResolvedBean().getBean(); } return controller; }
/** * Look up a handler method for the given request. */ @Override protected HandlerMethod getHandlerInternal( HttpServletRequest request ) throws Exception { String lookupPath = getUrlPathHelper().getLookupPathForRequest( request ); if ( logger.isDebugEnabled() ) { logger.debug( "Looking up handler method for path " + lookupPath ); } HandlerMethod handlerMethod = lookupHandlerMethod( lookupPath, request ); if ( logger.isDebugEnabled() ) { if ( handlerMethod != null ) { logger.debug( "Returning handler method [" + handlerMethod + "]" ); } else { logger.debug( "Did not find handler method for [" + lookupPath + "]" ); } } return ( handlerMethod != null ) ? handlerMethod.createWithResolvedBean() : null; }
return (handlerMethod != null ? handlerMethod.createWithResolvedBean() : null); } finally { Method releaseReadLockMethod = ReflectionUtils.findMethod(mappingRegistry.getClass(), "releaseReadLock");
handlerMethod = handlerMethod.createWithResolvedBean();
return (handlerMethod != null ? handlerMethod.createWithResolvedBean() : null);