Package io.micronaut.context.annotation
Annotation Type InjectScope
-
@Target(PARAMETER) @Retention(RUNTIME) @Scope public @interface InjectScopeAn annotation that can be declared on a constructor or method parameter that indicates that the injected bean should be destroyed after injection completes.
More specifically after a constructor or method which is annotated with
Injectcompletes execution then any parameters annotated withInjectScopewhich do not declare a specific scope such asSingletonwill be destroyed resulting in the execution ofPreDestroyhandlers on the bean and any dependent beans.- Since:
- 3.1.0