public class ClasspathScanningPersistenceUnitPostProcessor extends Object implements PersistenceUnitPostProcessor, ResourceLoaderAware, EnvironmentAware
PersistenceUnitPostProcessor that will scan for classes annotated with Entity or
MappedSuperclass and add them to the PersistenceUnit post processed. Beyond that
JPA XML mapping files can be scanned as well by configuring a file name pattern.| Constructor and Description |
|---|
ClasspathScanningPersistenceUnitPostProcessor(String basePackage)
Creates a new
ClasspathScanningPersistenceUnitPostProcessor using the given base package as scan base. |
| Modifier and Type | Method and Description |
|---|---|
void |
postProcessPersistenceUnitInfo(MutablePersistenceUnitInfo pui) |
void |
setEnvironment(Environment environment) |
void |
setMappingFileNamePattern(String mappingFilePattern)
Configures the file name pattern JPA entity mapping files shall scanned from the classpath.
|
void |
setResourceLoader(ResourceLoader resourceLoader) |
public ClasspathScanningPersistenceUnitPostProcessor(String basePackage)
ClasspathScanningPersistenceUnitPostProcessor using the given base package as scan base.basePackage - must not be null or empty.public void setMappingFileNamePattern(String mappingFilePattern)
mappingFilePattern - must not be null or empty.public void setResourceLoader(ResourceLoader resourceLoader)
setResourceLoader in interface ResourceLoaderAwarepublic void setEnvironment(Environment environment)
setEnvironment in interface EnvironmentAwarepublic void postProcessPersistenceUnitInfo(MutablePersistenceUnitInfo pui)
postProcessPersistenceUnitInfo in interface PersistenceUnitPostProcessorCopyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.