【发布时间】:2013-08-28 08:49:06
【问题描述】:
我最近将我的 Web 应用程序迁移到 Spring 3.2.3。 最近在尝试解决静态页面问题时,我遇到了 mvc:resources 命名空间。 但是,我在应用程序 context.xml 文件中遇到错误。 我已经搜索了很多但无法解决问题。请帮助。 我正在使用我的 Eclipse 8.6 和 Tomcat 6。
请注意,control+space 建议使用 mvc:resources.但我一使用它就会抛出 找不到元素 [资源] 的 BeanDefinitionParser
还尝试使用具有显式版本的架构。 我已经粘贴了相关代码
<?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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
<mvc:resources location="" mapping=""/>
</beans>
【问题讨论】:
标签: spring spring-mvc xsd-validation