I have a issue with Spring Data repositories.
When I deploy, I get an exception and it\'s because Spring Data tries to derive dynamically the method, but can\'t find
I had a issue like this and my mistake was the name of the custom repository class:
If the name of your jpa repository interface is LocaleJpaRepository
, your new custom interface should be named LocaleJpaRepositoryCustom
, but the class that makes the override in the method must be named LocaleJpaRepositoryImpl
, as it follows:
public class LocalJpaRepositoryImpl implements LocalJpaRepositoryCustom{
@Override
public void customMethod(){....}
}
Basically, the implementation class of your custom interface should start with the name of your repository interface (JPARepository) ending with 'Impl' keyword.
Custom Repository Implementation class name should be Interface name which is extending JPARepositry with Impl