Package io.micronaut.context.annotation
Contains core annotations related to Dependency Injection and the Bean Container.
- Since:
- 1.0
-
Enum Summary Enum Description Requires.Family Used to express an operation system family.Requires.Sdk Used to express a required SDK version. -
Annotation Types Summary Annotation Type Description Aliases A repeatable annotation that allows defining multipleAliasFor
definitions.AliasFor Allows specifying an annotation member alias.Any Qualifier that can be used on a bean to indicate it should match any qualifier or on a injection point to indicate it should match any bean.Bean Annotation used to configure a bean.BootstrapContextCompatible An annotation indicating that a bean can be loaded into the Bootstrap Context.Configuration A configuration is a grouping of bean definitions under a package.ConfigurationBuilder An annotation applicable to a field or method of aConfigurationProperties
instance that allows to customize the behaviour of properties that are builders themselves.ConfigurationInject Allows injecting configuration values into a constructor or method based on the parameter names.ConfigurationProperties Defines a singleton bean whose property values are resolved from aPropertyResolver
.ConfigurationReader A meta annotation for use with other annotations to indicate that the annotation reads configuration.Context Context scope indicates that the classes life cycle is bound to that of theBeanContext
and it should be initialized and shutdown during startup and shutdown of the underlyingBeanContext
.ContextConfigurer Annotation used to indicate the annotated class participates in the application context building phase.DefaultImplementation An annotation to apply to an interface to indicate which implementation is the default implementation.DefaultScope A meta annotation that can be applied to another annotation to specify a fallback scope of no scope is specified by the user for a bean.EachBean This annotation allows driving the production ofBean
definitions from presence of other bean definitions.EachProperty This annotation allows driving the production ofBean
definitions from either configuration or the presence of another bean definitionExecutable Annotation applied to the method or type indicating that aExecutableMethod
should be produced for this method.Factory A factory is aSingleton
that produces one or many other bean implementations.Import Allows importing an already compiled set of beans, placing any generating beans relative to the class where the import annotation is defined.Infrastructure Infrastructure scope represents a bean that cannot be overridden or replaced because it is critical to the functioning of the system.InjectScope An annotation that can be declared on a constructor or method parameter that indicates that the injected bean should be destroyed after injection completes.NonBinding Excludes a member of an annotation type (such as a qualifier type or interceptor binding type) from consideration when the container compares two annotation instances.Parallel A hint annotation that can be added toBean
definitions orExecutable
methods to indicate that they can be initialized in parallel with the application context.Parameter Specifies that an argument to a bean constructor is user provided and aParametrizedBeanFactory
should be generated.Primary AQualifier
that indicates that this bean is the primary bean that should be selected in the case of multiple possible interface implementations.Property A property that can be contained within aPropertySource
or used generally throughout the system.PropertySource An annotation that can be used on either the main class or a test to provide additional hard coded property values to theEnvironment
.Prototype Prototype scope is a non-singleton scope that creates a new bean for every injection point.Provided Deprecated. Use the typed member of theBean
annotation insteadReplaces Allows a bean to specify that it replaces another bean.Requirements For specifying multiple requirements.Requires Expresses a requirement for a bean orConfiguration
.Secondary Counter part toPrimary
that allows reducing the priority of a given bean for the purposes of dependency injection.Type Allows restricting injection by type.Value Allows configuration injection from the environment on a per property, field, method/constructor parameter basis.