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

前端 未结 4 979
死守一世寂寞
死守一世寂寞 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:31

    You must locate entities and repositories pakages by using

    @EnableJpaRepositories(basePackages = "your.repositories.pakage")
    
    @EntityScan(basePackages = "your.entities.pakage")
    

提交回复
热议问题