Loading JPA Entity from external Jar file

前端 未结 4 1955
清酒与你
清酒与你 2020-12-16 03:01

i have a project setup where i have modularized a project, and packaged a module into a jar file which gets included in the main project when we create a war and deploy it.

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 03:40

    Simply use

    @EntityScan("com...pakage-which-contains-entities...")
    

    Or if you have multiple entities packages, use

    @EntityScan(basePackages = {"...pkg1...", "...pkg2..."} )
    

提交回复
热议问题