Uploaded image for project: 'Spring Data JPA'
  1. Spring Data JPA
  2. DATAJPA-330

@EnableJpaRepositories activates exception translation for @Repository classes not in basePackages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3 GA
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have @Repository DAO classes that are not Spring Data repositories and are not part of the basePackages passed to @EnableJpaRepsitories(basePackages={}). They are incorrectly being activated for Spring DataAcessException translation and fail to autowire.

      @Repository annotated classes in the basePackages passed to @EnableJpaRepsitories(basePackages={}) are correctly being activated for Spring DataAcessException translation.

      After reading DATAJPA-112 and DATAJPA-221, I understand that @Repository makes a class eligible for Spring DataAccessException translation, but the basePackages paremeter of @EnableJpaRepositories implies I have control over which classes are translated.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              ebelisle Ed Belisle
              Last updater:
              Trevor Marshall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: