- All Implemented Interfaces and Traits:
- BeanDefinitionRegistryPostProcessor, PriorityOrdered
@groovy.transform.CompileStatic
class ServiceBeanDefinitionsPostProcessor
extends java.lang.Object
implements BeanDefinitionRegistryPostProcessor, PriorityOrdered
Registers a bean definition for every service artefact, replacing the registration the services
plugin previously performed through the doWithSpring() bean DSL. Service beans autowire
by name and use the scope declared on the service class, which 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 service
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 service name wins, preserving the ability of the application
(or another plugin) to override a service bean.
- Since:
- 8.0