类 AbstractTemplateViewResolver

java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
所有已实现的接口:
cn.taketoday.beans.factory.Aware, cn.taketoday.context.ApplicationContextAware, cn.taketoday.core.Ordered, ViewResolver
直接已知子类:
FreeMarkerViewResolver, GroovyMarkupViewResolver

public abstract class AbstractTemplateViewResolver extends UrlBasedViewResolver
Abstract base class for template view resolvers, in particular for FreeMarker views.

Provides a convenient way to specify AbstractTemplateView's exposure flags for request attributes, session attributes, and Framework's macro helpers.

从以下版本开始:
4.0
作者:
Juergen Hoeller
另请参阅:
  • 字段详细资料

    • exposeRequestAttributes

      private boolean exposeRequestAttributes
    • allowRequestOverride

      private boolean allowRequestOverride
    • exposeSessionAttributes

      private boolean exposeSessionAttributes
    • allowSessionOverride

      private boolean allowSessionOverride
  • 构造器详细资料

    • AbstractTemplateViewResolver

      public AbstractTemplateViewResolver()
  • 方法详细资料

    • requiredViewClass

      protected Class<?> requiredViewClass()
      从类复制的说明: UrlBasedViewResolver
      Return the required type of view for this resolver. This implementation returns AbstractUrlBasedView.
      覆盖:
      requiredViewClass 在类中 UrlBasedViewResolver
      另请参阅:
    • setExposeRequestAttributes

      public void setExposeRequestAttributes(boolean exposeRequestAttributes)
      Set whether all request attributes should be added to the model prior to merging with the template. Default is "false".
      另请参阅:
    • setAllowRequestOverride

      public void setAllowRequestOverride(boolean allowRequestOverride)
      Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. Default is "false", which causes an exception to be thrown if request attributes of the same name as model attributes are found.
      另请参阅:
    • setExposeSessionAttributes

      public void setExposeSessionAttributes(boolean exposeSessionAttributes)
      Set whether all HttpSession attributes should be added to the model prior to merging with the template. Default is "false".
      另请参阅:
    • setAllowSessionOverride

      public void setAllowSessionOverride(boolean allowSessionOverride)
      Set whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. Default is "false", which causes an exception to be thrown if session attributes of the same name as model attributes are found.
      另请参阅:
    • buildView

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

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

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

      覆盖:
      buildView 在类中 UrlBasedViewResolver
      参数:
      viewName - the name of the view to build
      返回:
      the View instance
      抛出:
      Exception - if the view couldn't be resolved
      另请参阅: