- All Implemented Interfaces and Traits:
- BeanDefinitionRegistryPostProcessor, PriorityOrdered
@groovy.util.logging.Slf4j
@groovy.transform.CompileStatic
class ControllerBeanDefinitionsPostProcessor
extends java.lang.Object
implements BeanDefinitionRegistryPostProcessor, PriorityOrdered
Registers a bean definition for every controller artefact, replacing the registration the
controllers plugin previously performed through the doWithSpring() bean DSL. Controller
beans autowire by name, use the scope declared on the controller class and cannot be expressed
through the org.springframework.beans.factory.BeanRegistry API, so the definitions are
contributed by this post-processor instead.
Runs as a PriorityOrdered post-processor with highest precedence so the controller
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 a controller name wins, preserving the ability of the application
(or another plugin) to override a controller bean.
- Since:
- 8.0