Spring annotations @Repository and @Service

There are a few reasons:

  1. It’s easier to target pointcuts with more specific annotations. Do not underestimate the usefulness of this!
  2. The @Repository annotation carries with it some additional functionality: it causes exceptions to be wrapped up as DataAccessExceptions.
  3. The @Service annotation may gain additional semantics in the future but it’s not happened yet…

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)