문제

It seems that spring-data only constructs repositories for interfaces that are defined at the top level. For example

public interface EmployeeRepository extends PagingAndSortingRepository<Employee, Long> {

}

works great but if i embed it into a class for example

public class Repositories {
    public static interface EmployeeRepository extends PagingAndSortingRepository<Employee, Long> {

    }
}

i cannot find any documentation on such a restriction. So my question is: Is it possible to define spring-data-repositories as inner-classes?

도움이 되었습니까?

해결책

You should set the considerNestedRepositories boolean to true.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top