类 BeanNameViewResolver

    • 方法详细资料

      • setOrder

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

        The default value is Ordered.LOWEST_PRECEDENCE, meaning non-ordered.

        另请参阅:
        Ordered.getOrder()
      • getOrder

        public int getOrder()
        从接口复制的说明: 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.

        指定者:
        getOrder 在接口中 Ordered
        返回:
        the order value
        另请参阅:
        Ordered.HIGHEST_PRECEDENCE, Ordered.LOWEST_PRECEDENCE
      • resolveViewName

        public View resolveViewName​(String viewName,
                                    Locale locale)
                             throws BeansException
        从接口复制的说明: ViewResolver
        Resolve the given view by name.

        Note: To allow for ViewResolver chaining, a ViewResolver should return null if a view with the given name is not defined in it. However, this is not required: Some ViewResolvers will always attempt to build View objects with the given name, unable to return null (rather throwing an exception when View creation failed).

        指定者:
        resolveViewName 在接口中 ViewResolver
        参数:
        viewName - name of the view to resolve
        locale - Locale in which to resolve the view. ViewResolvers that support internationalization should respect this.
        返回:
        the View object, or null if not found (optional, to allow for ViewResolver chaining)
        抛出:
        BeansException