当前页面:
在线文档首页 >
Spring Framework 2.0.5 API 文档英文版
FreeMarkerViewResolver (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版
org.springframework.web.servlet.view.freemarker
Class FreeMarkerViewResolver
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractCachingViewResolver
org.springframework.web.servlet.view.UrlBasedViewResolver
org.springframework.web.servlet.view.AbstractTemplateViewResolver
org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver
- All Implemented Interfaces:
- ApplicationContextAware, Ordered, ServletContextAware, ViewResolver
public class FreeMarkerViewResolver
- extends AbstractTemplateViewResolver
Convenience subclass of UrlBasedViewResolver that supports FreeMarkerView
(i.e. FreeMarker templates) and custom subclasses of it.
The view class for all views generated by this resolver can be specified
via setViewClass
. See UrlBasedViewResolver's javadoc for details.
Note: When chaining ViewResolvers, a FreeMarkerViewResolver always
needs to be last, as it will attempt to resolve any view name, no matter
whether the underlying resource actually exists.
- Since:
- 1.1
- Author:
- Juergen Hoeller
- See Also:
UrlBasedViewResolver.setViewClass(java.lang.Class)
,
UrlBasedViewResolver.setPrefix(java.lang.String)
,
UrlBasedViewResolver.setSuffix(java.lang.String)
,
UrlBasedViewResolver.setRequestContextAttribute(java.lang.String)
,
AbstractTemplateViewResolver.setExposeSpringMacroHelpers(boolean)
,
FreeMarkerView
Methods inherited from class org.springframework.web.servlet.view.UrlBasedViewResolver |
canHandle, createView, getAttributesMap, getCacheKey, getContentType, getOrder, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setOrder, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreeMarkerViewResolver
public FreeMarkerViewResolver()
- Sets default viewClass to
requiredViewClass
.
- See Also:
UrlBasedViewResolver.setViewClass(java.lang.Class)
,
requiredViewClass()
requiredViewClass
protected Class requiredViewClass()
- Requires FreeMarkerView.
- Overrides:
requiredViewClass
in class AbstractTemplateViewResolver
- See Also:
FreeMarkerView
Copyright © 2002-2007 The Spring Framework.