Package io.micronaut.context.event
Interface BeanCreatedEventListener<T>
- Type Parameters:
T
- The event type
- All Superinterfaces:
EventListener
- All Known Implementing Classes:
VersionAwareRouterListener
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@Indexed(BeanCreatedEventListener.class)
@FunctionalInterface
public interface BeanCreatedEventListener<T>
extends EventListener
An event listener that is triggered each time a bean is created.
Allows customization of the created beans.
- Since:
- 1.0
- Author:
- Graeme Rocher
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiononCreated
(@NonNull BeanCreatedEvent<T> event) Fired when a bean is created and allPostConstruct
initialization hooks have been called.
-
Method Details
-
onCreated
Fired when a bean is created and allPostConstruct
initialization hooks have been called.- Parameters:
event
- The bean created event- Returns:
- The bean or a replacement bean of the same type
-