现在的位置: 首页 > 综合 > 正文

org.springframework.web.servlet.view.InternalResourceViewResolver

2019年05月14日 ⁄ 综合 ⁄ 共 5497字 ⁄ 字号 评论关闭
文章目录

参见:http://www.boyunjian.com/javadoc/org.springframework/spring-webmvc/4.0.5.RELEASE/_/org/springframework/web/servlet/view/InternalResourceViewResolver.html

org.springframework.web.servlet.view

类 InternalResourceViewResolver

    • 方法详细资料

      • setAlwaysInclude

        public void setAlwaysInclude(boolean alwaysInclude)
        Specify whether to always include the view rather than forward to it.

        Default is "false". Switch this flag on to enforce the use of a Servlet include, even if a forward would be possible.

        另请参阅:
        InternalResourceView.setAlwaysInclude(boolean)

      • setExposeContextBeansAsAttributes

        public void setExposeContextBeansAsAttributes(boolean exposeContextBeansAsAttributes)
        Set whether to make all Spring beans in the application context accessible as request attributes, through lazy checking once an attribute gets accessed.

        This will make all such beans accessible in plain ${...} expressions in a JSP 2.0 page, as well as in JSTL'sc:out value expressions.

        Default is "false".

        另请参阅:
        InternalResourceView.setExposeContextBeansAsAttributes(boolean)

      • setExposedContextBeanNames

        public void setExposedContextBeanNames(java.lang.String[] exposedContextBeanNames)
        Specify the names of beans in the context which are supposed to be exposed. If this is non-null, only the specified beans are eligible for exposure as attributes.
        另请参阅:
        InternalResourceView.setExposedContextBeanNames(java.lang.String[])

      • buildView

        protected AbstractUrlBasedView buildView(java.lang.String viewName)
                                          throws java.lang.Exception
        从类复制的说明: UrlBasedViewResolver
        Creates a new View instance of the specified view class and configures it. Doesnot perform any lookup for pre-defined View instances.

        Spring lifecycle methods as defined by the bean container do not have to be called here; those will be applied by theloadView method after this method returns.

        Subclasses will typically call super.buildView(viewName) first, before setting further properties themselves.loadView will then apply Spring lifecycle methods at the end of this process.

        覆盖:
        buildView 在类中 UrlBasedViewResolver
        参数:
        viewName - the name of the view to build
        返回:
        the View instance
        抛出:
        java.lang.Exception - if the view couldn't be resolved
        另请参阅:
        UrlBasedViewResolver.loadView(String,
        java.util.Locale)

抱歉!评论已关闭.