Interface BeanInitializedEventListener<T>

Type Parameters:
T - The event type
All Superinterfaces:
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Indexed(BeanInitializedEventListener.class) @FunctionalInterface public interface BeanInitializedEventListener<T> extends EventListener

Allows hooking into bean instantiation at the point prior to when PostConstruct initialization hooks have been called and in the case of bean BeanProvider instances the BeanProvider.get() method has not yet been invoked.

This allows (for example) customization of bean properties prior to any initialization logic or factory logic.

Graeme Rocher
  • Method Details

    • onInitialized

      T onInitialized(BeanInitializingEvent<T> event)

      Fired when a bean is instantiated but the PostConstruct initialization hooks have not yet been called and in this case of bean Provider instances the Provider.get() method has not yet been invoked.

      event - The bean initializing event
      The bean or a replacement bean of the same type