DATAJPA-631 - ResourceLoader improvements in ClasspathScanningPersistenceUnitPostProcessor.
A custom ResourceLoader configured on ClasspathScanningPersistenceUnitPostProcessor is now propagated to the ClassPathScanningCandidateComponentProvider used for looking up entity classes. We also forward the configured environment so that profile annotations are evaluated as well. Related issue: DATACMNS-591.
This commit is contained in:
@@ -152,7 +152,7 @@ public class ClasspathScanningPersistenceUnitPostProcessorUnitTests {
|
||||
|
||||
ClasspathScanningPersistenceUnitPostProcessor processor = new ClasspathScanningPersistenceUnitPostProcessor(
|
||||
basePackage);
|
||||
ReflectionTestUtils.setField(processor, "resolver", resolver);
|
||||
ReflectionTestUtils.setField(processor, "mappingFileResolver", resolver);
|
||||
processor.setMappingFileNamePattern("**/*orm.xml");
|
||||
processor.postProcessPersistenceUnitInfo(pui);
|
||||
|
||||
@@ -162,7 +162,5 @@ public class ClasspathScanningPersistenceUnitPostProcessorUnitTests {
|
||||
}
|
||||
|
||||
@Entity
|
||||
public static class SampleEntity {
|
||||
|
||||
}
|
||||
public static class SampleEntity {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user