0

As part of project requirements, where we need to handle certain volume of data through REST call. Customer would call in a REST service, passing in a payload and distributed a jar of JAXB generated bean classes. Now these classes are not Entity beans by itself. Service should be able to use these JAXB objects and persists them as Entities using Spring Data JPA. But this required @Entity and other annotations required for JPA.

Is there a way to let Spring Data JPA know that these are entities and perform CRUD operations using JpaRespository etc? I know couple of options are discussed Separating JPA information from POJO and Is it possible to build a JPA entity by extending a POJO? . But those two are Hibernate specific solution and have control on the source code of the JAXB beans.

But I'm looking at solution more abstract in Spring Data JPA out of box.

Thanks

DBreaker
  • 319
  • 1
  • 4
  • 24

0 Answers0