ImportAware

/**
 * Interface to be implemented by any @{@link Configuration} class that wishes
 * to be injected with the {@link AnnotationMetadata} of the @{@code Configuration}
 * class that imported it. Useful in conjunction with annotations that
 * use @{@link Import} as a meta-annotation.
 *
 * @author Chris Beams
 * @since 3.1
 */
public interface ImportAware extends Aware {

    /**
     * Set the annotation metadata of the importing @{@code Configuration} class.
     */
    void setImportMetadata(AnnotationMetadata importMetadata);

}

这个类注释不容易翻译,比较拗口,就是说白了实现这个接口,重写setImportMetadata方法,就是用来处理自定义注解的,比如将注解的某些属性值赋值给其他bean的属性。

原文地址:https://www.cnblogs.com/yangfei-beijing/p/9047703.html