Java Spring mvc模式给出错误
我有一个春季mvc项目 它由以下文件组成 1)applicationContext.xml 2)web dispatcher servlet.xml 这两个文件都由xsi:schemaLocation组成 有时在项目中,它会在xsi:schemaLocation上给出错误 但是更新3-4次后错误将消失 My applicationContext.xmlJava Spring mvc模式给出错误,java,spring-mvc,Java,Spring Mvc,我有一个春季mvc项目 它由以下文件组成 1)applicationContext.xml 2)web dispatcher servlet.xml 这两个文件都由xsi:schemaLocation组成 有时在项目中,它会在xsi:schemaLocation上给出错误 但是更新3-4次后错误将消失 My applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<!-- Activates various annotations to be detected in bean classes -->
<context:annotation-config/>
<import resource="mongodb-config.xml" />
</beans>
我的webmvc-dispatcher-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
<context:component-scan base-package="com.practice" />
<mvc:annotation-driven />
</beans>
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
这是我需要更新项目以删除错误的正确解决方案吗
我正在使用EclipseOxy并进行maven更新我在IntellijIDEA中设置了一个SpringMVC项目。请在my web-dispatcher-servlet.xml中查看以下架构位置
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
<context:component-scan base-package="com.practice" />
<mvc:annotation-driven />
</beans>
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
你说过当你更新代码时错误会消失。您试图从版本控制更新吗?请澄清这一点 您可以在此处添加xml文件内容。。。看一看,我试着在EclipseOxygen中进行maven更新,错误消失了