public class GrailsSiteMeshViewResolverBeanPostProcessor extends SiteMeshViewResolverBeanPostProcessor
SiteMeshViewResolverBeanPostProcessor preconfigured to wrap
Grails' gspViewResolver bean with a
GrailsSiteMeshViewResolver.
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
TARGET_VIEW_RESOLVER_BEAN_NAME |
The primary GSP view resolver bean name in Grails. |
| Constructor and description |
|---|
GrailsSiteMeshViewResolverBeanPostProcessor() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public java.lang.Object |
postProcessAfterInitialization(java.lang.Object bean, java.lang.String beanName)Contexts can include this post-processor (via Sitemesh3AutoConfiguration)
without the SiteMesh plugin beans being registered — the unit-test context built
by grails-testing-support registers all Grails auto-configurations but never runs
the plugin's doWithSpring. |
The primary GSP view resolver bean name in Grails. The historical
name jspViewResolver is kept for compatibility with the
plugin's GroovyPagesPostProcessor, which registers the GSP
resolver under that name when it isn't already present (see
org.grails.plugins.web.GroovyPagesPostProcessor). The
modern GspAutoConfiguration.gspViewResolver() bean is
aliased to this name too when it fires.
Contexts can include this post-processor (via Sitemesh3AutoConfiguration)
without the SiteMesh plugin beans being registered — the unit-test context built
by grails-testing-support registers all Grails auto-configurations but never runs
the plugin's doWithSpring. Decoration is impossible without those beans,
so leave the view resolver unwrapped instead of failing the context.
Resolvers implementing ApplicationListener are also left unwrapped.
When the legacy grails-layout module is on the classpath its post-processor
installs the SiteMesh 2 GrailsLayoutViewResolver (an
ApplicationListener) as jspViewResolver; that resolver already
decorates, and wrapping it would additionally break Spring's event listener
retrieval, which expects the instance to match the definition's listener type.