[java-identity-provider] branch master updated: Inject ConditionalResourceResolver into the ResourceLoader added.
Scott Cantor
cantor.2 at osu.edu
Fri Jan 19 15:15:26 EST 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=276c0ac8bb0ff3120f447551cd2c849f58487a0b
The following commit(s) were added to refs/heads/master by this push:
new 276c0ac Inject ConditionalResourceResolver into the ResourceLoader added.
276c0ac is described below
commit 276c0ac8bb0ff3120f447551cd2c849f58487a0b
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Jan 19 15:15:24 2018 -0500
Inject ConditionalResourceResolver into the ResourceLoader added.
---
.../idp/test/PreferFileSystemApplicationContextInitializer.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/idp-conf/src/test/java/net/shibboleth/idp/test/PreferFileSystemApplicationContextInitializer.java b/idp-conf/src/test/java/net/shibboleth/idp/test/PreferFileSystemApplicationContextInitializer.java
index 26124ab..133f78c 100644
--- a/idp-conf/src/test/java/net/shibboleth/idp/test/PreferFileSystemApplicationContextInitializer.java
+++ b/idp-conf/src/test/java/net/shibboleth/idp/test/PreferFileSystemApplicationContextInitializer.java
@@ -19,6 +19,7 @@ package net.shibboleth.idp.test;
import javax.annotation.Nonnull;
+import net.shibboleth.ext.spring.resource.ConditionalResourceResolver;
import net.shibboleth.ext.spring.resource.PreferFileSystemResourceLoader;
import net.shibboleth.idp.spring.IdPPropertiesApplicationContextInitializer;
@@ -32,7 +33,7 @@ import org.springframework.core.annotation.Order;
/**
* An {@link ApplicationContextInitializer} which configures a given {@link GenericApplicationContext} to use a
- * {@link PreferFileSystemResourceLoader}.
+ * {@link PreferFileSystemResourceLoader} and a {@link ConditionalResourceResolver}.
*
* This initializer allows the {@link IdPPropertiesApplicationContextInitializer} to resolve "classpath*:" resources,
* and consequently has the highest priority order so that it is called before the
@@ -52,7 +53,9 @@ public class PreferFileSystemApplicationContextInitializer implements
@Override public void initialize(@Nonnull final ConfigurableApplicationContext applicationContext) {
if (applicationContext instanceof GenericApplicationContext) {
log.debug("Initializing application context '{}'", applicationContext);
- ((GenericApplicationContext) applicationContext).setResourceLoader(new PreferFileSystemResourceLoader());
+ final PreferFileSystemResourceLoader loader = new PreferFileSystemResourceLoader();
+ loader.addProtocolResolver(new ConditionalResourceResolver());
+ ((GenericApplicationContext) applicationContext).setResourceLoader(loader);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list