Interface CustomInjectorRegistryCustomizer
- All Superinterfaces:
Ordered
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Callback interface for customizing a
CustomInjectorRegistry.
Users can provide beans of this type via @Configuration classes with @Bean methods
to register custom injectors during context initialization.
Example usage:
@Configuration
public class MyInjectorsConfig {
@Bean
public CustomInjectorRegistryCustomizer registerMyInjector(SomeDep dep) {
return registry -> registry.register(new MyInjector(dep));
}
}
Customizers are applied in order during the DEFINITIONS_READY phase, before bean instantiation begins.
Implement Ordered.getOrder() to control the order in which customizers are applied;
lower values are applied first.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidcustomize(@NotNull CustomInjectorRegistry registry) Customize the given registry by registering, unregistering, or otherwise modifying injectors.
-
Method Details
-
customize
Customize the given registry by registering, unregistering, or otherwise modifying injectors.- Parameters:
registry- the registry to customize, not null
-