DATACMNS-764 - Fix ClassLoader lookup in XmlRepositoryConfigurationSource.

As per @jhoeller's recommendation, we now use the ResourceLoader's ClassLoader instead of the bean ClassLoader exposed by the XmlReaderContext. The latter can apparently be null outside certain lifecycle phases.

Related pull request: #201.
This commit is contained in:
Oliver Gierke
2017-06-09 15:31:51 +02:00
parent 9462a5ba47
commit dc30810936

View File

@@ -64,7 +64,7 @@ public class XmlRepositoryConfigurationSource extends RepositoryConfigurationSou
*/
public XmlRepositoryConfigurationSource(Element element, ParserContext context, Environment environment) {
super(environment, context.getReaderContext().getBeanClassLoader());
super(environment, context.getReaderContext().getResourceLoader().getClassLoader());
Assert.notNull(element, "Element must not be null!");
Assert.notNull(context, "Context must not be null!");