/**
   * Loads the repository interface contained in the given {@link RepositoryConfiguration} using the
   * given {@link ResourceLoader}.
   *
   * @param configuration must not be {@literal null}.
   * @param loader must not be {@literal null}.
   * @return the repository interface or {@literal null} if it can't be loaded.
   */
  private Class<?> loadRepositoryInterface(
      RepositoryConfiguration<?> configuration, ResourceLoader loader) {

    String repositoryInterface = configuration.getRepositoryInterface();
    ClassLoader classLoader = loader.getClassLoader();

    try {
      return org.springframework.util.ClassUtils.forName(repositoryInterface, classLoader);
    } catch (ClassNotFoundException e) {
      LOGGER.warn(
          String.format(CLASS_LOADING_ERROR, getModuleName(), repositoryInterface, classLoader), e);
    } catch (LinkageError e) {
      LOGGER.warn(
          String.format(CLASS_LOADING_ERROR, getModuleName(), repositoryInterface, classLoader), e);
    }

    return null;
  }