Service class
Marks a class as a bean that holds business logic.
It does exactly what Component does. The different name tells the reader which layer the class belongs to, and it can be used in scan filters and pointcuts.
// The repository bean is injected through the constructor.
@Service()
class OrderService {
OrderService(this.repository);
final OrderRepository repository;
}
Spring (Java):
@Service
class OrderService {
OrderService(OrderRepository repository) { ... }
}
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