Skip to content

Commit be21358

Browse files
committed
reintroduced getHandler(request, cache) in deprecated form (after removing it in 3.0.4)
1 parent 5da5fc6 commit be21358

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/DispatcherServlet.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ protected void doDispatch(HttpServletRequest request, HttpServletResponse respon
750750
processedRequest = checkMultipart(request);
751751

752752
// Determine handler for the current request.
753-
mappedHandler = getHandler(processedRequest);
753+
mappedHandler = getHandler(processedRequest, false);
754754
if (mappedHandler == null || mappedHandler.getHandler() == null) {
755755
noHandlerFound(processedRequest, response);
756756
return;
@@ -905,7 +905,21 @@ protected void cleanupMultipart(HttpServletRequest request) {
905905
/**
906906
* Return the HandlerExecutionChain for this request. Try all handler mappings in order.
907907
* @param request current HTTP request
908-
* @return the HandlerExceutionChain, or <code>null</code> if no handler could be found
908+
* @param cache whether to cache the HandlerExecutionChain in a request attribute
909+
* @return the HandlerExecutionChain, or <code>null</code> if no handler could be found
910+
* @deprecated as of Spring 3.0.4, in favor of {@link #getHandler(javax.servlet.http.HttpServletRequest)},
911+
* with this method's cache attribute now effectively getting ignored
912+
*/
913+
@Deprecated
914+
protected HandlerExecutionChain getHandler(HttpServletRequest request, boolean cache) throws Exception {
915+
return getHandler(request);
916+
}
917+
918+
/**
919+
* Return the HandlerExecutionChain for this request.
920+
* <p>Tries all handler mappings in order.
921+
* @param request current HTTP request
922+
* @return the HandlerExecutionChain, or <code>null</code> if no handler could be found
909923
*/
910924
protected HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception {
911925
for (HandlerMapping hm : this.handlerMappings) {

0 commit comments

Comments
 (0)