aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-spring-initializer/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/moa-id-spring-initializer/src/main/java')
-rw-r--r--id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java b/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java
index 75e076d84..cc5552e81 100644
--- a/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java
+++ b/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java
@@ -8,6 +8,7 @@ import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.support.GenericApplicationContext;
+import org.springframework.core.io.ClassPathResource;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.request.RequestContextListener;
@@ -36,7 +37,7 @@ public class MOAIDAuthSpringInitializer implements WebApplicationInitializer {
public MOAIDAuthSpringInitializer() {
this.rootServletContexts = null;
this.servletContexts = new String[] {
- "/WEB-INF/applicationContext.xml",
+ "/applicationContext.xml",
};
this.activeProfiles = null;
@@ -92,10 +93,14 @@ public class MOAIDAuthSpringInitializer implements WebApplicationInitializer {
Logger.debug("Loading servlet config in "+ rootContext);
if (servletContexts != null) {
for (String servletContextString : servletContexts) {
- xmlReader.loadBeanDefinitions(new ServletContextResource(
- servletContext, servletContextString));
+ xmlReader.loadBeanDefinitions(new ClassPathResource(
+ servletContextString,
+ MOAIDAuthSpringInitializer.class));
}
}
+
+
+
Logger.debug("Refreshing context "+ rootContext);
rootContext.refresh();