Class UrlBasedViewResolverRegistration
java.lang.Object
org.springframework.web.servlet.config.annotation.UrlBasedViewResolverRegistration
Assist with configuring a
UrlBasedViewResolver
.- Since:
- 4.1
- Author:
- Sebastien Deleuze, Rossen Stoyanchev
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattributes
(Map<String, ?> attributes) Set static attributes to be added to the model of every request for all views resolved by this view resolver.cache
(boolean cache) Enable or disable caching.cacheLimit
(int cacheLimit) Specify the maximum number of entries for the view cache.protected UrlBasedViewResolver
Set the prefix that gets prepended to view names when building a URL.Set the suffix that gets appended to view names when building a URL.Set the view class that should be used to create views.Set the view names (or name patterns) that can be handled by this view resolver.
-
Field Details
-
viewResolver
-
-
Constructor Details
-
UrlBasedViewResolverRegistration
-
-
Method Details
-
getViewResolver
-
prefix
Set the prefix that gets prepended to view names when building a URL.- See Also:
-
suffix
Set the suffix that gets appended to view names when building a URL.- See Also:
-
viewClass
Set the view class that should be used to create views.- See Also:
-
viewNames
Set the view names (or name patterns) that can be handled by this view resolver. View names can contain simple wildcards such that 'my*', '*Report' and '*Repo*' will all match the view name 'myReport'.- See Also:
-
attributes
Set static attributes to be added to the model of every request for all views resolved by this view resolver. This allows for setting any kind of attribute values, for example bean references.- See Also:
-
cacheLimit
Specify the maximum number of entries for the view cache. Default is 1024.- See Also:
-
cache
Enable or disable caching.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.
- See Also:
-