@Service

A Spring annotation that marks a class as a service bean so component scanning discovers and creates it.

In more detail

@Service is a specialisation of @Component that documents intent: this class holds application logic. Other stereotypes include @Repository and @Controller.

Example

@Service public class GreetingService { ... }

Related terms

Taught in

References