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>