0

In Spring, Hibernate/JPA Configuration, to load all entities we are using packagesToScan property. How this one internally works and loads all entities.

<property name="packagesToScan">
    <array>
        <value>com.test1</value>
        <value>com.test2</value>
    </array>
</property>
Ranga Reddy
  • 2,936
  • 4
  • 29
  • 41

1 Answers1

1

JPA implementation scans all classes within the identified packages and checks them if they are annotated as entity using @Entity on class level, if the class annotated then it is an entity class, otherwise it will be ignored.

AmjadD
  • 73
  • 1
  • 9