Class ProviderCreatingFactoryBean

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<Provider<Object>>
org.springframework.beans.factory.config.ProviderCreatingFactoryBean
All Implemented Interfaces:
Aware, BeanClassLoaderAware, BeanFactoryAware, DisposableBean, FactoryBean<Provider<Object>>, InitializingBean

public class ProviderCreatingFactoryBean extends AbstractFactoryBean<Provider<Object>>
A FactoryBean implementation that returns a value which is a JSR-330 Provider that in turn returns a bean sourced from a BeanFactory.

This is basically a JSR-330 compliant variant of Spring's good old ObjectFactoryCreatingFactoryBean. It can be used for traditional external dependency injection configuration that targets a property or constructor argument of type jakarta.inject.Provider, as an alternative to JSR-330's @Inject annotation-driven approach.

Since:
3.0.2
Author:
Juergen Hoeller
See Also: