001/* 002 * Copyright 2012-2017 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.boot.autoconfigure; 018 019import java.util.EventListener; 020 021import org.springframework.beans.factory.BeanClassLoaderAware; 022import org.springframework.beans.factory.BeanFactoryAware; 023import org.springframework.context.EnvironmentAware; 024import org.springframework.context.ResourceLoaderAware; 025 026/** 027 * Listener that can be registered with {@code spring.factories} to receive details of 028 * imported auto-configurations. 029 * <p> 030 * An {@link AutoConfigurationImportListener} may implement any of the following 031 * {@link org.springframework.beans.factory.Aware Aware} interfaces, and their respective 032 * methods will be called prior to 033 * {@link #onAutoConfigurationImportEvent(AutoConfigurationImportEvent)}: 034 * <ul> 035 * <li>{@link EnvironmentAware}</li> 036 * <li>{@link BeanFactoryAware}</li> 037 * <li>{@link BeanClassLoaderAware}</li> 038 * <li>{@link ResourceLoaderAware}</li> 039 * </ul> 040 * 041 * @author Phillip Webb 042 * @since 1.5.0 043 */ 044@FunctionalInterface 045public interface AutoConfigurationImportListener extends EventListener { 046 047 /** 048 * Handle an auto-configuration import event. 049 * @param event the event to respond to 050 */ 051 void onAutoConfigurationImportEvent(AutoConfigurationImportEvent event); 052 053}