@groovy.transform.CompileStatic class UrlMappingsBeanDefinitionsPostProcessor extends java.lang.Object implements BeanDefinitionRegistryPostProcessor, PriorityOrdered
Registers the URL-mapping bean definitions the url-mappings plugin previously contributed through
the doWithSpring() bean DSL. The grailsUrlMappingsHolder bean is a
ProxyFactoryBean (in reload mode) whose produced type — UrlMappings, which
extends UrlMappingsHolder — is only known from its
proxyInterfaces property, and UrlMappingsHandlerMapping takes a constructor
reference to it. Neither the property-driven factory-bean type nor the constructor reference can
be expressed through the org.springframework.beans.factory.BeanRegistry API without hiding
the produced type inside an instance supplier — which breaks by-type autowiring of
UrlMappingsHolder (e.g. DefaultLinkGenerator). The definitions are therefore
contributed here, mirroring the original DSL so Spring's factory-bean type prediction behaves
identically.
Runs as a PriorityOrdered post-processor with highest precedence so the definitions
are registered before Spring Boot's configuration-class post-processor evaluates auto-configuration
conditions — the same visibility the doWithSpring() registration had.
| Constructor and description |
|---|
UrlMappingsBeanDefinitionsPostProcessor(boolean reloadEnabled, boolean corsFilterEnabled) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
int |
getOrder() |
|
void |
postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) |
| 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) |