Interface AnnotationConfigRegistry
- All Known Implementing Classes:
AnnotationConfigApplicationContext, AnnotationConfigWebApplicationContext
public interface AnnotationConfigRegistry
Common interface for annotation config application contexts,
defining
register(BeanRegistrar...) and scan(String...) methods.- Since:
- 4.1
- Author:
- Juergen Hoeller
-
Method Summary
Modifier and TypeMethodDescriptionvoidRegister one or more component classes to be processed, inferring annotation-based characteristics for primary/fallback/lazy-init just like for scanned component classes.voidregister(BeanRegistrar... registrars) Invoke the given registrars for registering their beans with this application context.voidPerform a scan within the specified base packages.
-
Method Details
-
register
Invoke the given registrars for registering their beans with this application context.This can be used to register custom beans without inferring annotation-based characteristics for primary/fallback/lazy-init, rather specifying those programmatically if needed.
- Parameters:
registrars- one or moreBeanRegistrarinstances- Since:
- 7.0
- See Also:
-
register
Register one or more component classes to be processed, inferring annotation-based characteristics for primary/fallback/lazy-init just like for scanned component classes.Calls to
registerare idempotent; adding the same component class more than once has no additional effect.- Parameters:
componentClasses- one or more component classes, for example,@Configurationclasses- See Also:
-
scan
Perform a scan within the specified base packages.- Parameters:
basePackages- the packages to scan for component classes- See Also:
-