ConditionalOnMissingBean class
Register bean only if no bean of the specified type exists
Example:
@Service()
@ConditionalOnMissingBean(UserService)
class DefaultUserService implements UserService {
// Only registered if no other UserService bean exists
}
- Inheritance
-
- Object
- Conditional
- ConditionalOnMissingBean
Constructors
- ConditionalOnMissingBean(Type type, {String? qualifier})
-
const
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