-
Notifications
You must be signed in to change notification settings - Fork 41.7k
Closed
Description
Version: Spring Boot 1.4.1
Subject: @SpyBean on Data Jpa Repository bean isn't working
Exception thrown:
UnsatisfiedDependencyException: Error creating bean with name 'cityService' defined in file [...\target\classes\com\example\CityService.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cityRepository': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Object of class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean] must be an instance of interface com.example.CityRepository
Demonstration project: https://github.com/igormukhin/spring-boot-issue-6871
USE BRANCH: spybean-on-jparepository
ianaz, sbaldrich, brabenetz, jeffersondev, kirill-gr and 49 more
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug