@groovy.transform.CompileStatic class InterceptorBeanDefinitionsPostProcessor extends java.lang.Object implements BeanDefinitionRegistryPostProcessor, PriorityOrdered
Registers the interceptor bean definitions the interceptors plugin previously contributed through
the doWithSpring() bean DSL: the grailsInterceptorMappedInterceptor (wrapping the
handler adapter as an inner bean) and one bean per interceptor artefact. Interceptor
beans autowire by name and the adapter must remain an inner bean — a top-level
GrailsInterceptorHandlerInterceptorAdapter would be
collected a second time by WebUtils.lookupHandlerInterceptors and run every interceptor
twice — and neither can be expressed through the
org.springframework.beans.factory.BeanRegistry API, so the definitions are contributed
here instead.
Runs as a PriorityOrdered post-processor with highest precedence so the interceptor
definitions are registered before Spring Boot's configuration-class post-processor evaluates
auto-configuration conditions — the same visibility the doWithSpring() registration had.
An existing definition for an interceptor name wins, preserving the ability of the application
(or another plugin) to override an interceptor bean.
| Constructor and description |
|---|
InterceptorBeanDefinitionsPostProcessor(GrailsApplication grailsApplication, boolean useJsessionId) |
| 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) |