Farhan Ali25 days agoMost voted7
You're mostly right, all three get picked up by component scanning. The real difference is @Repository: Spring translates database specific exceptions into its DataAccessException hierarchy for beans marked with it. @Service has no extra behaviour, it's just to mark the service layer.