diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-03-09 11:35:56 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-03-09 11:35:56 +0100 |
commit | 04a8a85a7092f460e30553394ae415ad9bed18ed (patch) | |
tree | 02a58fbb6f022ab926ca7d7ef2af14643d04b2d2 /id/server/moa-id-spring-initializer/src/main/java/at/gv | |
parent | f9020f47b60bc1cff6c671461924ba606ce87853 (diff) | |
download | moa-id-spss-04a8a85a7092f460e30553394ae415ad9bed18ed.tar.gz moa-id-spss-04a8a85a7092f460e30553394ae415ad9bed18ed.tar.bz2 moa-id-spss-04a8a85a7092f460e30553394ae415ad9bed18ed.zip |
move basic applicationContext.xml to SpringInitialization modul
Diffstat (limited to 'id/server/moa-id-spring-initializer/src/main/java/at/gv')
-rw-r--r-- | id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java | 11 |
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(); |