diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-10-01 15:12:04 +0200 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2019-10-01 15:12:04 +0200 |
commit | 63d74e5db5a38672c221467d51a737bc019df38d (patch) | |
tree | 7b30b3f71c59acad8f5561c942773429f9fdc767 | |
parent | a3aeeb7cce564d80c44f1b9aa96208f3a50cfda5 (diff) | |
download | EAAF-Components-63d74e5db5a38672c221467d51a737bc019df38d.tar.gz EAAF-Components-63d74e5db5a38672c221467d51a737bc019df38d.tar.bz2 EAAF-Components-63d74e5db5a38672c221467d51a737bc019df38d.zip |
inject ResourceLoader to facilitate Spring based resource loading
-rw-r--r-- | eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java | 2 | ||||
-rw-r--r-- | eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/FileUtils.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java index 5027a84b..ce9ba57c 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java @@ -47,6 +47,7 @@ import org.apache.commons.lang3.ArrayUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ResourceLoader; import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.IRequestStorage; @@ -71,6 +72,7 @@ public abstract class AbstractAuthServletTask extends AbstractTask { @Autowired(required=true) IProtocolAuthenticationService protAuchService; @Autowired(required=true) protected IRequestStorage requestStoreage; @Autowired(required=true) protected IConfiguration authConfig; + @Autowired(required=true) protected ResourceLoader resourceLoader; @Autowired protected IRevisionLogger revisionsLogger; diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/FileUtils.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/FileUtils.java index fff83e53..6ac51ac4 100644 --- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/FileUtils.java +++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/FileUtils.java @@ -121,7 +121,8 @@ public class FileUtils { if(null == url) return null; - if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:") || url.startsWith("ftp:")) { + if (url.startsWith("http:") || url.startsWith("https:") || url.startsWith("file:") + || url.startsWith("ftp:") || url.startsWith("classpath:")) { return url; } else { |