I've already read about each Spring annotation in What's the difference between @Component, @Repository & @Service annotations in Spring?
I know that @Component
and @Service
do almost the same inside the Spring Framework. The difference it's bounded to it's usage, so I just use @Service
into the service layer where I access my repositories.
I want to know what's the better way to choose @Component
instead of @Service
. Note that I'm using @Component
now for a factory I've created, because the factory don't need to deal with repositories.