The Javadoc for the AbstractApplicationContext.postProcessBeanFactory(:ConfigurableListableBeanFactory)
method specifically states:
"All bean definitions will have been loaded, but no beans will have been instantiated yet."
While the later is true, the former is no longer true when bean definitions come from @Configuration
classes, which won't be processed (i.e. "loaded" & "registered") until the ConfigurationClassPostProcessor
is invoked.
Technically, it is a difference between here (the method and Javadoc in question) vs. here (where the ConfigurationClassPostProcessor
will eventually be invoked).
As you know, the ConfigurationClassPostProcessor
uses the ConfigurationClassBeanDefinitionReader
to "load" bean definitions.
At one time, most likely during the days of XML configuration, and before the advent of JavaConfig with @Configuration
classes, this statement was probably true. However, now the statement may be a bit misleading for framework developers building extensions to the framework, such as an ApplicationContext
implementation extending from AbstractApplicationContext
.