Class AnnotationMethodHandlerAdapter

    • Method Detail

      • setAlwaysUseFullPath

        public void setAlwaysUseFullPath​(boolean alwaysUseFullPath)
        Deprecated.
        Set if URL lookup should always use the full path within the current servlet context. Else, the path within the current servlet mapping is used if applicable (that is, in the case of a ".../*" servlet mapping in web.xml).

        Default is "false".

        See Also:
        UrlPathHelper.setAlwaysUseFullPath(boolean)
      • setUrlDecode

        public void setUrlDecode​(boolean urlDecode)
        Deprecated.
        Set if context path and request URI should be URL-decoded. Both are returned undecoded by the Servlet API, in contrast to the servlet path.

        Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).

        See Also:
        UrlPathHelper.setUrlDecode(boolean)
      • setUrlPathHelper

        public void setUrlPathHelper​(UrlPathHelper urlPathHelper)
        Deprecated.
        Set the UrlPathHelper to use for resolution of lookup paths.

        Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple HandlerMappings and HandlerAdapters.

      • setPathMatcher

        public void setPathMatcher​(PathMatcher pathMatcher)
        Deprecated.
        Set the PathMatcher implementation to use for matching URL paths against registered URL patterns.

        Default is AntPathMatcher.

      • setMethodNameResolver

        public void setMethodNameResolver​(MethodNameResolver methodNameResolver)
        Deprecated.
        Set the MethodNameResolver to use for resolving default handler methods (carrying an empty @RequestMapping annotation).

        Will only kick in when the handler method cannot be resolved uniquely through the annotation metadata already.

      • setWebBindingInitializer

        public void setWebBindingInitializer​(WebBindingInitializer webBindingInitializer)
        Deprecated.
        Specify a WebBindingInitializer which will apply pre-configured configuration to every DataBinder that this controller uses.
      • setCacheSecondsForSessionAttributeHandlers

        public void setCacheSecondsForSessionAttributeHandlers​(int cacheSecondsForSessionAttributeHandlers)
        Deprecated.
        Cache content produced by @SessionAttributes annotated handlers for the given number of seconds. Default is 0, preventing caching completely.

        In contrast to the "cacheSeconds" property which will apply to all general handlers (but not to @SessionAttributes annotated handlers), this setting will apply to @SessionAttributes annotated handlers only.

        See Also:
        WebContentGenerator.setCacheSeconds(int), SessionAttributes
      • setSynchronizeOnSession

        public void setSynchronizeOnSession​(boolean synchronizeOnSession)
        Deprecated.
        Set if controller execution should be synchronized on the session, to serialize parallel invocations from the same client.

        More specifically, the execution of the handleRequestInternal method will get synchronized if this flag is "true". The best available session mutex will be used for the synchronization; ideally, this will be a mutex exposed by HttpSessionMutexListener.

        The session mutex is guaranteed to be the same object during the entire lifetime of the session, available under the key defined by the SESSION_MUTEX_ATTRIBUTE constant. It serves as a safe reference to synchronize on for locking on the current session.

        In many cases, the HttpSession reference itself is a safe mutex as well, since it will always be the same object reference for the same active logical session. However, this is not guaranteed across different servlet containers; the only 100% safe way is a session mutex.

        See Also:
        HttpSessionMutexListener, WebUtils.getSessionMutex(javax.servlet.http.HttpSession)
      • setCustomArgumentResolver

        public void setCustomArgumentResolver​(WebArgumentResolver argumentResolver)
        Deprecated.
        Set a custom WebArgumentResolvers to use for special method parameter types.

        Such a custom WebArgumentResolver will kick in first, having a chance to resolve an argument value before the standard argument handling kicks in.

      • setCustomArgumentResolvers

        public void setCustomArgumentResolvers​(WebArgumentResolver... argumentResolvers)
        Deprecated.
        Set one or more custom WebArgumentResolvers to use for special method parameter types.

        Any such custom WebArgumentResolver will kick in first, having a chance to resolve an argument value before the standard argument handling kicks in.

      • setCustomModelAndViewResolver

        public void setCustomModelAndViewResolver​(ModelAndViewResolver customModelAndViewResolver)
        Deprecated.
        Set a custom ModelAndViewResolvers to use for special method return types.

        Such a custom ModelAndViewResolver will kick in first, having a chance to resolve a return value before the standard ModelAndView handling kicks in.

      • setCustomModelAndViewResolvers

        public void setCustomModelAndViewResolvers​(ModelAndViewResolver... customModelAndViewResolvers)
        Deprecated.
        Set one or more custom ModelAndViewResolvers to use for special method return types.

        Any such custom ModelAndViewResolver will kick in first, having a chance to resolve a return value before the standard ModelAndView handling kicks in.

      • setMessageConverters

        public void setMessageConverters​(HttpMessageConverter<?>[] messageConverters)
        Deprecated.
        Set the message body converters to use.

        These converters are used to convert from and to HTTP requests and responses.

      • setOrder

        public void setOrder​(int order)
        Deprecated.
        Specify the order value for this HandlerAdapter bean.

        Default value is Integer.MAX_VALUE, meaning that it's non-ordered.

        See Also:
        Ordered.getOrder()
      • getOrder

        public int getOrder()
        Deprecated.
        Description copied from interface: Ordered
        Get the order value of this object.

        Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet load-on-startup values).

        Same order values will result in arbitrary sort positions for the affected objects.

        Specified by:
        getOrder in interface Ordered
        Returns:
        the order value
        See Also:
        Ordered.HIGHEST_PRECEDENCE, Ordered.LOWEST_PRECEDENCE
      • supports

        public boolean supports​(Object handler)
        Deprecated.
        Description copied from interface: HandlerAdapter
        Given a handler instance, return whether or not this HandlerAdapter can support it. Typical HandlerAdapters will base the decision on the handler type. HandlerAdapters will usually only support one handler type each.

        A typical implementation:

        return (handler instanceof MyHandler);

        Specified by:
        supports in interface HandlerAdapter
        Parameters:
        handler - handler object to check
        Returns:
        whether or not this object can use the given handler
      • handle

        public ModelAndView handle​(HttpServletRequest request,
                                   HttpServletResponse response,
                                   Object handler)
                            throws Exception
        Deprecated.
        Description copied from interface: HandlerAdapter
        Use the given handler to handle this request. The workflow that is required may vary widely.
        Specified by:
        handle in interface HandlerAdapter
        Parameters:
        request - current HTTP request
        response - current HTTP response
        handler - handler to use. This object must have previously been passed to the supports method of this interface, which must have returned true.
        Returns:
        ModelAndView object with the name of the view and the required model data, or null if the request has been handled directly
        Throws:
        Exception - in case of errors