-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Description
Empowered by the JPA 3.2 PersistenceConfiguration support (#35662; see #31157 (comment)) and inspired by recent efforts in JPA 4.0 around the discoverability of provider-annotated types and packages (see 05ffe82 within #35705), we can add a setPackagesToScan configuration method to LocalEntityManagerFactoryBean as well - matching the common setup method on LocalContainerEntityManagerFactoryBean and LocalSessionFactoryBean.
This makes LocalEntityManagerFactoryBean a sufficiently capable candidate for replacing LocalContainerEntityManagerFactoryBean in common setups. It lacks load-time weaving support (which is only available in the JPA container bootstrap contract, not the "Java SE" standalone bootstrap mode) but is notably closely aligned with the LocalSessionFactoryBean way of Hibernate bootstrapping, just under JPA conventions.