Core Spring Annotations – Context Configuration Annotations

Core Spring Annotations – Context Configuration Annotations

Annotation Use Description
@Autowired Field, Constructor, Methods This annotation declares a constructor, method, field, or configuration method to be autowired by type. While using this annotation ,it do not have to be public.
@Configurable Type Used with <context:springconfigured> to declare types whose properties should be injected, even if they are not instantiated by Spring. This annotation Typically used to inject the properties of domain objects.
@Order Type, Method, Field This Defines ordering. As an alternative to implementing the org. springframework.core.Ordered interface.
@Qualifier Field, Type, Annotation Type, Parameter This Guides autowiring to be performed, in a way more than just a type.
@Required Method (setters) This Specifies a particular property, that must be injected or else the configuration will fail.
@Scope Type This Specifies the scope of a bean, by either singleton, prototype, request, session, or some other custom scope.