Skip to content

Commit 8ab9da4

Browse files
committed
introduced BeanDefinitionRegistryPostProcessor extension to BeanFactoryPostProcessor; @configuration classes support definition of BeanFactoryPostProcessor beans as well (SPR-6455, SPR-6611)
1 parent a897e3f commit 8ab9da4

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright 2002-2010 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.beans.factory.support;
18+
19+
import org.springframework.beans.BeansException;
20+
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
21+
22+
/**
23+
* Extension to the standard {@link BeanFactoryPostProcessor} SPI, allowing for
24+
* the registration of further bean definitions <i>before</i> regular
25+
* BeanFactoryPostProcessor detection kicks in. In particular,
26+
* BeanDefinitionRegistryPostProcessor may register further bean definitions
27+
* which in turn define BeanFactoryPostProcessor instances.
28+
*
29+
* @author Juergen Hoeller
30+
* @since 3.0.1
31+
* @see org.springframework.context.annotation.ConfigurationClassPostProcessor
32+
*/
33+
public interface BeanDefinitionRegistryPostProcessor extends BeanFactoryPostProcessor {
34+
35+
/**
36+
* Modify the application context's internal bean definition registry after its
37+
* standard initialization. All regular bean definitions will have been loaded,
38+
* but no beans will have been instantiated yet. This allows for adding further
39+
* bean definitions before the next post-processing phase kicks in.
40+
* @param registry the bean definition registry used by the application context
41+
* @throws org.springframework.beans.BeansException in case of errors
42+
*/
43+
void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException;
44+
45+
}

0 commit comments

Comments
 (0)