美文网首页
org.springframework.beans.factor

org.springframework.beans.factor

作者: moralok | 来源:发表于2020-04-15 18:24 被阅读0次
    package org.springframework.beans.factory;
    
    /**
     * Callback that allows a bean to be aware of the bean
     * {@link ClassLoader class loader}; that is, the class loader used by the
     * present bean factory to load bean classes.
     *
     * <p>This is mainly intended to be implemented by framework classes which
     * have to pick up application classes by name despite themselves potentially
     * being loaded from a shared class loader.
     *
     * <p>For a list of all bean lifecycle methods, see the
     * {@link BeanFactory BeanFactory javadocs}.
     *
     * @author Juergen Hoeller
     * @author Chris Beams
     * @since 2.0
     * @see BeanNameAware
     * @see BeanFactoryAware
     * @see InitializingBean
     */
    public interface BeanClassLoaderAware extends Aware {
    
        /**
         * Callback that supplies the bean {@link ClassLoader class loader} to
         * a bean instance.
         * <p>Invoked <i>after</i> the population of normal bean properties but
         * <i>before</i> an initialization callback such as
         * {@link InitializingBean InitializingBean's}
         * {@link InitializingBean#afterPropertiesSet()}
         * method or a custom init-method.
         * @param classLoader the owning class loader
         */
        void setBeanClassLoader(ClassLoader classLoader);
    
    }
    

    简介

    org.springframework.beans.factory.Aware 的一个子接口。

    文档

    允许 bean 知道 bean ClassLoader 的回调;即当前 bean工厂 加载 bean类
    使用的类加载器。
    这主要是由框架类实现的,尽管应用程序类可能是从共享的类加载器加载的,但框架类必须按名称选择它们。

    有关所有 bean生命周期 方法的列表,请参见 BeanFactory javadocs

    相关文章

      网友评论

          本文标题:org.springframework.beans.factor

          本文链接:https://www.haomeiwen.com/subject/eoiqvhtx.html