@org.springframework.boot.autoconfigure.AutoConfiguration @org.springframework.boot.autoconfigure.AutoConfigureAfter(name = "org.springframework.boot.webmvc.autoconfigure.DispatcherServletAutoConfiguration") @org.springframework.boot.autoconfigure.AutoConfigureBefore(name = "org.sitemesh.autoconfigure.SiteMeshViewResolverAutoConfiguration") @org.springframework.boot.autoconfigure.condition.ConditionalOnClass(SiteMeshViewResolverBeanPostProcessor.class) @org.springframework.boot.autoconfigure.condition.ConditionalOnProperty(name = "sitemesh.integration", havingValue = "view-resolver", matchIfMissing = true) public class Sitemesh3AutoConfiguration extends java.lang.Object
Registers the Grails SiteMesh 3 integration beans ahead of the upstream
auto-configuration: the GrailsSiteMeshViewResolverBeanPostProcessor,
the CaptureAwareContentProcessor (contentProcessor) and the
Sitemesh3LayoutFinder (decoratorSelector).
Upstream's SiteMeshViewResolverAutoConfiguration declares each of
these with a @ConditionalOnMissingBean guard. By scheduling this
configuration first (via AutoConfigureBefore) the Grails
implementations are registered before those guards are evaluated, so the
upstream defaults back off cleanly rather than being registered and then
overridden after the fact.
The contentProcessor and decoratorSelector beans drive view
decoration, which is only meaningful when Spring MVC is resolving views, so
they are gated on a DispatcherServlet being present. This keeps them
out of the lightweight unit-test contexts built by grails-testing-support,
which have no dispatcher servlet.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public CaptureAwareContentProcessor |
contentProcessor() |
|
public Sitemesh3LayoutFinder |
decoratorSelector(ObjectProvider<GrailsConventionGroovyPageLocator> groovyPageLocator, GrailsApplication grailsApplication) |
|
public static GrailsSiteMeshViewResolverBeanPostProcessor |
siteMeshViewResolverBeanPostProcessor() |
| 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) |