org.springframework.beans.factory.config

Class ProviderCreatingFactoryBean

    • Constructor Detail

      • ProviderCreatingFactoryBean

        public ProviderCreatingFactoryBean()
    • Method Detail

      • setTargetBeanName

        public void setTargetBeanName(java.lang.String targetBeanName)
        Set the name of the target bean.

        The target does not have to be a non-singleton bean, but realistically always will be (because if the target bean were a singleton, then said singleton bean could simply be injected straight into the dependent object, thus obviating the need for the extra level of indirection afforded by this factory approach).

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Description copied from class: AbstractFactoryBean
        Eagerly create the singleton instance, if necessary.
        Specified by:
        afterPropertiesSet in interface InitializingBean
        Overrides:
        afterPropertiesSet in class AbstractFactoryBean<Provider<java.lang.Object>>
        Throws:
        java.lang.Exception - in the event of misconfiguration (such as failure to set an essential property) or if initialization fails for any other reason