diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java index f90b2a5cc61..9e84d356d95 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,8 +117,8 @@ import org.springframework.web.util.WebUtils; public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter implements BeanFactoryAware, InitializingBean { - private static final boolean completionStagePresent = ClassUtils.isPresent("java.util.concurrent.CompletionStage", - RequestMappingHandlerAdapter.class.getClassLoader()); + private static final boolean completionStagePresent = ClassUtils.isPresent( + "java.util.concurrent.CompletionStage", RequestMappingHandlerAdapter.class.getClassLoader()); private List customArgumentResolvers; @@ -444,7 +444,14 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter /** * Cache content produced by {@code @SessionAttributes} annotated handlers - * for the given number of seconds. Default is 0, preventing caching completely. + * for the given number of seconds. + *

Possible values are: + *

*

In contrast to the "cacheSeconds" property which will apply to all general * handlers (but not to {@code @SessionAttributes} annotated handlers), * this setting will apply to {@code @SessionAttributes} handlers only. @@ -727,8 +734,9 @@ public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter } } } - - mav = invokeHandlerMethod(request, response, handlerMethod); + else { + mav = invokeHandlerMethod(request, response, handlerMethod); + } if (getSessionAttributesHandler(handlerMethod).hasSessionAttributes()) { applyCacheSeconds(response, this.cacheSecondsForSessionAttributeHandlers);