JPA 2.0: Adding entity classes to PersistenceUnit *from different jar* automatically

前端 未结 8 583
余生分开走
余生分开走 2020-11-29 02:23

I have a maven-built CDI-based Java SE app, which has a core module, and other modules.
Core has the persistence.xml and some entities. Modules hav

8条回答
  •  误落风尘
    2020-11-29 03:04

    for JPA 2+ this does the trick

    
    

    scan all jars in war for annotated @Entity classes

提交回复
热议问题