Java Spring mvc在AWS elastic beanstalk中不起作用

Java Spring mvc在AWS elastic beanstalk中不起作用,java,spring,spring-mvc,amazon-web-services,amazon-elastic-beanstalk,Java,Spring,Spring Mvc,Amazon Web Services,Amazon Elastic Beanstalk,我尝试在Amazon Elastic Beanstalk中使用Spring MVC,但失败了, 但当我在localhost上运行时,它运行得很好 请告诉我这个错误 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 17 in XML document from ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.

我尝试在Amazon Elastic Beanstalk中使用Spring MVC,但失败了, 但当我在localhost上运行时,它运行得很好

请告诉我这个错误

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 17 in XML document from ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 17; columnNumber: 62; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'resources'.
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
    org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
这是我的servlet上下文,我相信aws指出 web资源/映射=/resources/**

行是问题所在,我已经检查、反复检查并再次检查模式位置是否正确

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" 
       xmlns:context="http://www.springframework.org/schema/context" 
       xmlns:mvc="http://www.springframework.org/schema/mvc" 
       xmlns:p="http://www.springframework.org/schema/p" 
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd     
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd     
       http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd" >


    <!-- Turns on support for mapping requests to Spring MVC @Controller methods
         Also registers default Formatters and Validators for use across all @Controllers -->
    <mvc:annotation-driven />

    <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources -->
    <mvc:resources location="/resources/, classpath:/META-INF/web-resources/" mapping="/resources/**"/>

    <!-- register "global" interceptor beans to apply to all registered HandlerMappings -->
    <mvc:interceptors>
        <bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="lang"/>
    </mvc:interceptors>

    <!-- Resolves localized messages*.properties and application.properties files in the application to allow for internationalization. 
        The messages*.properties files translate messages, the application.properties
        resource bundle localizes all application specific messages such as entity names and menu items. -->
    <bean class="org.springframework.context.support.ReloadableResourceBundleMessageSource" id="messageSource" p:basenames="WEB-INF/i18n/messages,WEB-INF/i18n/application" p:fallbackToSystemLocale="false"/>

    <!-- store preferred language configuration in a cookie -->
    <bean class="org.springframework.web.servlet.i18n.CookieLocaleResolver" id="localeResolver" 
        p:cookieName="locale"/> 


    <!-- Resolves views selected for rendering by @Controllers to .jsp resources 
        in the /WEB-INF/views directory -->
    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/views/" />
        <property name="suffix" value=".jsp" />
    </bean>

    <context:component-scan base-package="com.myweb.web.controller" />

</beans>

请帮我解决问题,显然是因为elasticbeans无法加载我上传的最新版本

我尝试删除环境并再次上传.war,它成功了


谢谢

您使用的是Maven Elasticbeanstalk插件吗?