org.springframework.data.jpa.support
Class ClasspathScanningPersistenceUnitPostProcessor
java.lang.Object
org.springframework.data.jpa.support.ClasspathScanningPersistenceUnitPostProcessor
- All Implemented Interfaces:
- Aware, ResourceLoaderAware, PersistenceUnitPostProcessor
public class ClasspathScanningPersistenceUnitPostProcessor
- extends Object
- implements PersistenceUnitPostProcessor, ResourceLoaderAware
PersistenceUnitPostProcessor that will scan for classes annotated with Entity or
MappedSuperclass and add them to the PersistenceUnit post prcessed. Beyond that JPA
XML mapping files can be scanned as well by configuring a file name pattern.
- Author:
- Oliver Gierke
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClasspathScanningPersistenceUnitPostProcessor
public ClasspathScanningPersistenceUnitPostProcessor(String basePackage)
- Creates a new
ClasspathScanningPersistenceUnitPostProcessor using the given base package as scan base.
- Parameters:
basePackage - must not be null or empty.
setMappingFileNamePattern
public void setMappingFileNamePattern(String mappingFilePattern)
- Configures the file name pattern JPA entity mapping files shall scanned from the classpath. Lookup will use the
configured base package as root.
- Parameters:
mappingFilePattern - must not be null or empty.
setResourceLoader
public void setResourceLoader(ResourceLoader resourceLoader)
- Specified by:
setResourceLoader in interface ResourceLoaderAware
postProcessPersistenceUnitInfo
public void postProcessPersistenceUnitInfo(MutablePersistenceUnitInfo pui)
- Specified by:
postProcessPersistenceUnitInfo in interface PersistenceUnitPostProcessor
Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.