diff --git a/src/main/java/org/springframework/data/repository/core/support/RepositoryFactoryBeanSupport.java b/src/main/java/org/springframework/data/repository/core/support/RepositoryFactoryBeanSupport.java index 12ef4656c..ceb5067f5 100644 --- a/src/main/java/org/springframework/data/repository/core/support/RepositoryFactoryBeanSupport.java +++ b/src/main/java/org/springframework/data/repository/core/support/RepositoryFactoryBeanSupport.java @@ -67,6 +67,20 @@ public abstract class RepositoryFactoryBeanSupport, private RepositoryMetadata repositoryMetadata; + protected RepositoryFactoryBeanSupport() {} + + /** + * Creates a new {@link RepositoryFactoryBeanSupport} for the given repository interface. + * + * @param repositoryInterface must not be {@literal null}. + */ + protected RepositoryFactoryBeanSupport(Class repositoryInterface) { + + Assert.notNull(repositoryInterface, "Repository interface must not be null on initialization!"); + + this.repositoryInterface = repositoryInterface; + } + /** * Setter to inject the repository interface to implement. *