Description
Oliver Drotbohm opened SPR-11260 and commented
When the packages-to-scan feature of our LocalContainerEntityManagerFactoryBean
is used, the default persistence unit created will cause the persistence providers to not scan for additional mapping files anymore.
This is unfortunate as global entity listeners can only be defined in XML currently. The Spring Data JPA auditing feature relies on this way of configuration. So if you're trying to use this feature you effectively have to opt out of all the nice defaulting provided by Spring and Spring Boot as you need to run with a custom persistence.xml
and orm.xml
again.
As META-INF/orm.xml
is a reserved file it would be great if we could scan for it and expose it in the default PersistenceUnitInfo
created.
Affects: 4.0 GA
Issue Links:
- Propagate LCEMFB.packagesToScan to native PersistenceProvider to pick up annotated packages [SPR-10910] #15538 Propagate LCEMFB.packagesToScan to native PersistenceProvider to pick up annotated packages
- orm.xml should be recognized by default if using JPA [SPR-11234] #15859 orm.xml should be recognized by default if using JPA
Referenced from: commits spring-projects/spring-boot@d39a836