001/* 002 * Copyright 2002-2010 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 * https://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.beans.factory.support; 018 019import org.springframework.beans.BeansException; 020import org.springframework.beans.factory.config.BeanFactoryPostProcessor; 021 022/** 023 * Extension to the standard {@link BeanFactoryPostProcessor} SPI, allowing for 024 * the registration of further bean definitions <i>before</i> regular 025 * BeanFactoryPostProcessor detection kicks in. In particular, 026 * BeanDefinitionRegistryPostProcessor may register further bean definitions 027 * which in turn define BeanFactoryPostProcessor instances. 028 * 029 * @author Juergen Hoeller 030 * @since 3.0.1 031 * @see org.springframework.context.annotation.ConfigurationClassPostProcessor 032 */ 033public interface BeanDefinitionRegistryPostProcessor extends BeanFactoryPostProcessor { 034 035 /** 036 * Modify the application context's internal bean definition registry after its 037 * standard initialization. All regular bean definitions will have been loaded, 038 * but no beans will have been instantiated yet. This allows for adding further 039 * bean definitions before the next post-processing phase kicks in. 040 * @param registry the bean definition registry used by the application context 041 * @throws org.springframework.beans.BeansException in case of errors 042 */ 043 void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException; 044 045}