Spring Boot w/ JPA: move @Entity to different package

前端 未结 4 970
死守一世寂寞
死守一世寂寞 2020-12-28 14:03

I\'m having trouble with my first steps using Spring-Boot with JPA. I\'ve started with a pretty minimalistic example from Git using Gradle.

Now simply moving

4条回答
  •  失恋的感觉
    2020-12-28 14:33

    this is what worked for me :

    @EnableJpaRepositories(basePackages ={ "package1","package2"})
    @EntityScan(basePackages ={ "package3","package4"})
    

提交回复
热议问题