forum

home / developersection / forums / difference between @component, @repository & @service annotations in spring?

Difference between @Component, @Repository & @Service annotations in Spring?

Anonymous User 2811 14-Jul-2015
Can @Component, @Repository & @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?

Updated on 23-Jul-2016

I am a content writter !

Can you answer this question?

Answer

2 Answers

Liked By