devxlogo

Usage of the Repository Factory Class

Usage of the Repository Factory Class

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); 

devx-admin

Share the Post: