Can @Component, @Repository and @Service annotations be used interchangeably in Spring or do they provide any particular functionality besides acting as a notation device?>
Annotate other components with @Component, for example REST Resource classes.
@Component
public class AdressComp{
.......
...//some code here
}
@Component is a generic stereotype for any Spring managed component.
@Controller, @Service and @Repository are Specializations of @Component for specific use cases.