Fallback class
Makes this bean the one used only when no other bean of the type is there.
It is the opposite of Primary: a default that steps aside as soon as another candidate exists, for example a real implementation that a test profile replaces.
@Component()
@Fallback()
class SystemClock implements Clock { ... }
@Component()
@Profile(['test'])
class FixedClock implements Clock { ... } // wins when present
Spring (Java, 6.2+):
@Component
@Fallback
class SystemClock implements Clock { ... }
Constructors
- Fallback()
-
Marks the bean as fallback.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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