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

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

    Location of entities in Spring Boot can be configured using @EntityScan.

    By default, @EnableAutoConfiguration enables entity scanning in the package where it's placed (if it's not a default package).

提交回复
热议问题