Qualifier class
Qualifier annotation for specific bean selection
When multiple beans of the same type are available, use @Qualifier
to specify which specific bean should be injected.
Example:
@Service()
@Qualifier('primary')
class PrimaryUserService implements UserService { }
@Service()
@Qualifier('secondary')
class SecondaryUserService implements UserService { }
@Component()
class UserController {
@Autowired()
@Qualifier('primary')
late UserService userService;
}
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited