Tuesday 26 January 2016

java - What's the difference between @Component, @Repository & @Service annotations in Spring?

Can @Component, @Repository and @Service annotations be used interchangeably in Spring or do they provide any particular functionality besides acting as a notation device?



In other words, if I have a Service class and I change the annotation from @Service to @Component, will it still behave the same way?



Or does the annotation also influence the behavior and functionality of the class?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...