Package org.apache.struts2.config
Interface BeanSelectionProvider
- All Superinterfaces:
ConfigurationProvider,ContainerProvider,PackageProvider
- All Known Implementing Classes:
AbstractBeanSelectionProvider,StrutsBeanSelectionProvider
A
ConfigurationProvider that selects and aliases bean implementations.
Implementations of this interface are responsible for selecting which bean implementation to use for a given interface type. The selection is typically based on configuration properties that specify the bean name or class name.
The aliasing mechanism works as follows:
- Look for a bean by the name specified in the configuration property
- If found, alias it to the default name so it becomes the default implementation
- If not found, try to load the value as a class name and register it as a factory
- If class loading fails, delegate to
ObjectFactoryat runtime (useful for Spring bean names)
-
Method Summary
Methods inherited from interface org.apache.struts2.config.ContainerProvider
destroy, init, needsReload, registerMethods inherited from interface org.apache.struts2.config.PackageProvider
init, loadPackages, needsReload