ViewResolver instances.
This class is expected to be used via WebMvcConfigurer#configureViewResolvers.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ApplicationContext | |
| private ContentNegotiatingViewResolver | |
| private final ContentNegotiationManager | |
| private Integer | |
| private final List |
| Access | Constructor and Description |
|---|---|
| public | ViewResolverRegistry(ContentNegotiationManager contentNegotiationManager, ApplicationContext context)
Class constructor with |
| Modifier and Type | Method and Description |
|---|---|
| public void | beanName()
Register a bean name view resolver that interprets view names as the names
of |
| private boolean | |
| public void | enableContentNegotiation(View... defaultViews)
Enable use of a |
| public void | enableContentNegotiation(boolean useNotAcceptableStatus, View... defaultViews)
Enable use of a |
| public UrlBasedViewResolverRegistration | freeMarker()
Register a FreeMarker view resolver with an empty default view name prefix and a default suffix of ".ftl". |
| protected int | |
| protected List | |
| public UrlBasedViewResolverRegistration | groovy()
Register a Groovy markup view resolver with an empty default view name prefix and a default suffix of ".tpl". |
| public boolean | |
| private ContentNegotiatingViewResolver | |
| public UrlBasedViewResolverRegistration | jsp()
Register JSP view resolver using a default view name prefix of "/WEB-INF/" and a default suffix of ".jsp". |
| public UrlBasedViewResolverRegistration | |
| public void | order(int order)
ViewResolver's registered through this registry are encapsulated in an
instance of |
| public UrlBasedViewResolverRegistration | scriptTemplate()
Register a script template view resolver with an empty default view name prefix and suffix. |
| public void |
| applicationContext | back to summary |
|---|---|
| private final ApplicationContext applicationContext
| |
| contentNegotiatingResolver | back to summary |
|---|---|
| private ContentNegotiatingViewResolver contentNegotiatingResolver
| |
| contentNegotiationManager | back to summary |
|---|---|
| private final ContentNegotiationManager contentNegotiationManager
| |
| order | back to summary |
|---|---|
| private Integer order
| |
| viewResolvers | back to summary |
|---|---|
| private final List<ViewResolver> viewResolvers | |
| ViewResolverRegistry | back to summary |
|---|---|
| public ViewResolverRegistry(ContentNegotiationManager contentNegotiationManager, ApplicationContext context) Class constructor with
| |
| beanName | back to summary |
|---|---|
| public void beanName() Register a bean name view resolver that interprets view names as the names
of | |
| checkBeanOfType | back to summary |
|---|---|
| private boolean checkBeanOfType(Class<?> beanType) | |
| enableContentNegotiation | back to summary |
|---|---|
| public void enableContentNegotiation(View... defaultViews) Enable use of a If invoked multiple times the provided default views will be added to any other default views that may have been configured already. | |
| enableContentNegotiation | back to summary |
|---|---|
| public void enableContentNegotiation(boolean useNotAcceptableStatus, View... defaultViews) Enable use of a If invoked multiple times the provided default views will be added to any other default views that may have been configured already. | |
| freeMarker | back to summary |
|---|---|
| public UrlBasedViewResolverRegistration freeMarker() Register a FreeMarker view resolver with an empty default view name prefix and a default suffix of ".ftl". Note that you must also configure FreeMarker by adding a
| |
| getOrder | back to summary |
|---|---|
| protected int getOrder() | |
| getViewResolvers | back to summary |
|---|---|
| protected List | |
| groovy | back to summary |
|---|---|
| public UrlBasedViewResolverRegistration groovy() Register a Groovy markup view resolver with an empty default view name prefix and a default suffix of ".tpl". | |
| hasRegistrations | back to summary |
|---|---|
| public boolean hasRegistrations() Whether any view resolvers have been registered. | |
| initContentNegotiatingViewResolver | back to summary |
|---|---|
| private ContentNegotiatingViewResolver initContentNegotiatingViewResolver(View[] defaultViews) | |
| jsp | back to summary |
|---|---|
| public UrlBasedViewResolverRegistration jsp() Register JSP view resolver using a default view name prefix of "/WEB-INF/" and a default suffix of ".jsp". When this method is invoked more than once, each call will register a new ViewResolver instance. Note that since it's not easy to determine if a JSP exists without forwarding to it, using multiple JSP-based view resolvers only makes sense in combination with the "viewNames" property on the resolver indicating which view names are handled by which resolver. | |
| jsp | back to summary |
|---|---|
| public UrlBasedViewResolverRegistration jsp(String prefix, String suffix) Register JSP view resolver with the specified prefix and suffix. When this method is invoked more than once, each call will register a new ViewResolver instance. Note that since it's not easy to determine if a JSP exists without forwarding to it, using multiple JSP-based view resolvers only makes sense in combination with the "viewNames" property on the resolver indicating which view names are handled by which resolver. | |
| order | back to summary |
|---|---|
| public void order(int order) ViewResolver's registered through this registry are encapsulated in an
instance of By default this property is not set, which means the resolver is ordered
at | |
| scriptTemplate | back to summary |
|---|---|
| public UrlBasedViewResolverRegistration scriptTemplate() Register a script template view resolver with an empty default view name prefix and suffix.
| |
| viewResolver | back to summary |
|---|---|
| public void viewResolver(ViewResolver viewResolver) Register a | |
| Access | Constructor and Description |
|---|---|
| public |
| FreeMarkerRegistration | back to summary |
|---|---|
| public FreeMarkerRegistration() | |
| Access | Constructor and Description |
|---|---|
| public |
| GroovyMarkupRegistration | back to summary |
|---|---|
| public GroovyMarkupRegistration() | |
| Access | Constructor and Description |
|---|---|
| public |
| ScriptRegistration | back to summary |
|---|---|
| public ScriptRegistration() | |