protected static class GspAutoConfiguration.ReplaceViewResolverRegistrar extends java.lang.Object implements ImportBeanDefinitionRegistrar, EnvironmentAware
Makes the GSP view resolver the primary viewResolver for GSP applications by
replacing the viewResolver bean (WebMvcAutoConfiguration's
ContentNegotiatingViewResolver) with an alias to gspViewResolver.
Removal of WebMvcAutoConfiguration's defaultViewResolver
(InternalResourceViewResolver) is handled centrally for every Grails servlet web
application by GrailsViewResolverAutoConfiguration (grails-controllers), so it is
not repeated here.
Controlled by the spring.gsp.replaceViewResolverBean configuration property.
Also makes it answer to jspViewResolver, the name Grails gives an application's own
view resolver: RenderSitemeshTagLib resolves the layout view of
<g:applyLayout> through a resolver qualified by that name. That one is an alias only
where nothing is registered under the name already - an application serving JSP may well have
a resolver of its own there, and an alias would answer in its place without saying so, since
it is resolved ahead of a bean definition of the same name.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) |
|
public void |
setEnvironment(Environment environment) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |