Updated the CustomRepositoryFactoryBean to use the new RepositoryMetadata.getDomainType() method.