Interface AnnotationConfigRegistry
- All Known Implementing Classes:
AnnotationConfigApplicationContext
,AnnotationConfigWebApplicationContext
public interface AnnotationConfigRegistry
Common interface for annotation config application contexts,
defining
register(org.springframework.beans.factory.BeanRegistrar...)
and scan(java.lang.String...)
methods.- Since:
- 4.1
- Author:
- Juergen Hoeller
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Register one or more component classes to be processed, inferring annotation-based characteristics for primary/fallback/lazy-init just like for scanned component classes.void
register
(BeanRegistrar... registrars) Invoke the given registrars for registering their beans with this application context.void
Perform 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 moreBeanRegistrar
instances- 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
register
are idempotent; adding the same component class more than once has no additional effect.- Parameters:
componentClasses
- one or more component classes, for example,@Configuration
classes- See Also:
-
scan
Perform a scan within the specified base packages.- Parameters:
basePackages
- the packages to scan for component classes- See Also:
-