Jun 14th, 2010, 04:08 AM
@Repository annotated component causing problem when in packaged in JAR
I've got a CommonDaoJpa component packaged in a dependency JAR.
When I annotated it with @Repository("commonDaoJpa"), then the dependent project tests have the following exception :
No matching bean of type [com.company.commons.persistence.jpa.CommonDaoJpa] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency
If I just comment out the @Repository annotation, the tests work fine.
I can't understand what could cause the problem.
Is it a known limitation with the @Repository ?
I'm just asking in case this is a know problem.
I'll probably have to post a test cade reproducing the error.