ApplicationContextAwareProcessor class final
The bean post-processor that calls the *Aware callbacks of this
library on each bean, with the context's objects.
Every context registers it during the refresh, so beans that implement
EnvironmentAware, ApplicationContextAware and the like get their
callbacks. You only need it when you build a container of your own.
The callbacks run in Spring's order: environment, value resolver,
resource loader, event publisher, message source, application context.
context.beanFactory.addBeanPostProcessor(
ApplicationContextAwareProcessor(context),
);
Spring (Java):
// Registered internally by AbstractApplicationContext.prepareBeanFactory:
beanFactory.addBeanPostProcessor(
new ApplicationContextAwareProcessor(this));
- Inheritance
-
- Object
- BeanPostProcessor
- ApplicationContextAwareProcessor
Constructors
- ApplicationContextAwareProcessor(ConfigurableApplicationContext context)
-
Creates a processor that hands
context(and its environment) to the beans.
Properties
- context → ConfigurableApplicationContext
-
The context passed to the
*Awarecallbacks; it is also the resource loader, event publisher and message source they receive.final - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postProcessAfterInitialization(
Object bean, String beanName) → Object -
Called for each new bean after its init callbacks. The returned
object (a proxy, say) is what the container exposes and injects.
Also applied to
FactoryBeanproducts.inherited -
postProcessBeforeInitialization(
Object bean, String beanName) → Object -
Calls every
*Awarecallbackbeanimplements, then returns the bean unchanged. Runs before the bean's init callbacks.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited