Annotation Interface Named
This annotation is used to specify which named bean should be injected into a constructor
or method parameter. It serves the same purpose as the standard javax.inject.Named annotation but without
requiring a dependency on the javax.inject module.
Example:
Comparison with @Name:
Do not confuse this annotation with @Name, which serves a different purpose:
@Named- Specifies which named bean to inject (bean qualifier)@Name- Specifies the parameter name for bean property mapping when bytecode parameter names are not available
Example showing the difference:
See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
value
The bean name to use for injection.- Returns:
- The bean name.
-