title: contextConfigLocation with two files for security and for apppservlet
body: <p>Hi in my MVC apllication
  i have two</p>
  
  <pre><code>contextConfigLocation  files
  </code></pre>
  
  <p>one for security purpose named </p>
  
  <pre><code>spring-security.xml
  </code></pre>
  
  <p>the other one for servlet redirection named </p>
  
  <pre><code>appServlet-servlet.xml
  </code></pre>
  
  <p>My question is how to add both in my </p>
  
  <pre><code>web.xml
  </code></pre>
  
  <p>which  is </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
           xmlns="http://java.sun.com/xml/ns/javaee" 
           xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd" 
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
                               http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd" 
           id="WebApp_ID" version="2.5"&gt;
  
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;/WEB-INF/enregistrer_client.jsp&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
      &lt;!--
          - Filtre springSecurityFilterChain
      --&gt;
  
      &lt;filter&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
      &lt;/filter&gt;
  
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/filter-mapping&gt;
  
      &lt;!--
        ContextLoaderListener : chargement fichiers de définition de beans
      --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;!--
        Fichiers XML de configuration, à charger par le ContextLoaderListener
      --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;
              /WEB-INF/spring-security.xml,/WEB-INF/appServlet-servlet.xml
          &lt;/param-value&gt;
      &lt;/context-param&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>because these lines </p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
          /WEB-INF/spring-security.xml,/WEB-INF/appServlet-servlet.xml
      &lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>returns </p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.web.bind.annotation.RequestMapping.consumes()[Ljava/lang/String;
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
  at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
  at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
  at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
  at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
  at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
  at org.apache.catalina.core.StandardService.start(StandardService.java:525)
  at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
  </code></pre>
  
  <p>Thank you</p>