Spring Data provide a class named RepositoryFactorySupport. Via this class we can access any repository, as in the following example:
RepositoryFactorySupport factory = ... // code that instantiate the factory;CustomerRepository repo = factory.getRepository(CustomerRepository.class);