com.opensymphony.xwork2.config

## Interface BeanSelectionProvider

- All Superinterfaces:
    ConfigurationProvider, ContainerProvider, PackageProvider
  All Known Implementing Classes:
    AbstractBeanSelectionProvider, StrutsBeanSelectionProvider

      public interface BeanSelectionProvider
      extends ConfigurationProvider

  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:

  1. Look for a bean by the name specified in the configuration property
  2. If found, alias it to the default name so it becomes the default implementation
  3. If not found, try to load the value as a class name and register it as a factory
  4. If class loading fails, delegate to `org.apache.struts2.ObjectFactory` at runtime (useful for Spring bean names)
  See Also:
    `AbstractBeanSelectionProvider`, `StrutsBeanSelectionProvider`

- - ### Method Summary

    - ### Methods inherited from interface com.opensymphony.xwork2.config.ContainerProvider

      `destroy, init, needsReload, register`

    - ### Methods inherited from interface com.opensymphony.xwork2.config.PackageProvider

      `init, loadPackages, needsReload`

Copyright © 2000–2026 Apache Software Foundation. All rights reserved.