The previous entries are very related, so my questions are as follows:
1- Can the annotations @Component,
@Repository
and @Service
be used interchangeably in Spring or do they provide any particular functionality besides acting as an annotation?
In other words, if I have a service class and change the annotation of @Service
to @Component
:
2- Will you continue to behave in the same way? Or does the annotation also influence the behavior and functionality of the class?
3-Could you exchange them and for example use @Service
when conceptually you should have @Repository
?