Spring Data JPA How to build a generic Repository for multiple entities?

I'm beginning to work with Spring Data JPA repositories. We have an application already using Spring MVC (No spring boot or spring data JPA), where we have written a Generic DAO class that handles basic CRUD operations for virtually all entities that we have. Any other special operations can be handled by writing custom DAOs.

Now, Spring data JPA has made things very easy by requiring us to write only an interface and the rest is taken care of.

public interface PersonRepository extends JpaRepository {


This is cool, but I was wondering...

Read More »

By: StackOverFlow - Thursday, 8 November

Related Posts