public class UrlBasedViewResolverRegistration extends Object
UrlBasedViewResolver
.Modifier and Type | Field and Description |
---|---|
protected UrlBasedViewResolver |
viewResolver |
Constructor and Description |
---|
UrlBasedViewResolverRegistration(UrlBasedViewResolver viewResolver) |
Modifier and Type | Method and Description |
---|---|
UrlBasedViewResolverRegistration |
attributes(Map<String,?> attributes)
Set static attributes to be added to the model of every request for all
views resolved by this view resolver.
|
UrlBasedViewResolverRegistration |
cache(boolean cache)
Enable or disable caching.
|
UrlBasedViewResolverRegistration |
cacheLimit(int cacheLimit)
Specify the maximum number of entries for the view cache.
|
protected UrlBasedViewResolver |
getViewResolver() |
UrlBasedViewResolverRegistration |
prefix(String prefix)
Set the prefix that gets prepended to view names when building a URL.
|
UrlBasedViewResolverRegistration |
suffix(String suffix)
Set the suffix that gets appended to view names when building a URL.
|
UrlBasedViewResolverRegistration |
viewClass(Class<?> viewClass)
Set the view class that should be used to create views.
|
UrlBasedViewResolverRegistration |
viewNames(String... viewNames)
Set the view names (or name patterns) that can be handled by this view
resolver.
|
protected final UrlBasedViewResolver viewResolver
public UrlBasedViewResolverRegistration(UrlBasedViewResolver viewResolver)
protected UrlBasedViewResolver getViewResolver()
public UrlBasedViewResolverRegistration prefix(String prefix)
public UrlBasedViewResolverRegistration suffix(String suffix)
public UrlBasedViewResolverRegistration viewClass(Class<?> viewClass)
public UrlBasedViewResolverRegistration viewNames(String... viewNames)
public UrlBasedViewResolverRegistration attributes(Map<String,?> attributes)
public UrlBasedViewResolverRegistration cacheLimit(int cacheLimit)
public UrlBasedViewResolverRegistration cache(boolean cache)
This is equivalent to setting the "cacheLimit"
property to the default limit (1024) or to 0, respectively.
Default is "true": caching is enabled. Disable this only for debugging and development.