【发布时间】:2014-03-07 10:50:13
【问题描述】:
我正在使用 Spring 3.2.6 并尝试使用该标签。问题是 Eclipse 似乎无法找到 mvc 命名空间。 这是我的 XML:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:mvc="http://www.springframework.org/schema/mvc"
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/spring-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.xsd">
我尝试过不使用“http://www.springframework.org/schema/mvc/spring-mvc.xsd”版本,但仍然无法正常工作。 Eclipse 无法自动完成“mvc”。如果我尝试运行它,我会得到“cvc-complex-type.2.4.c:匹配的通配符是严格的,但找不到元素'mvc:annotation-driven'的声明。”错误,我已经用谷歌搜索并没有太大帮助。
可以完成 aop 和上下文前缀,并且我的类路径中有 spring-webmvc-3.2.6.jar。 任何帮助将不胜感激。问候,Alexx
【问题讨论】:
-
我建议你检查一下你是否在某些公司防火墙后面,这可能会阻止 eclipse 检查远程 xsd 资源
-
不,不是这样。我可以看到 Window > Preferences > Network Connection > Cache 中列出的架构。
标签: java eclipse spring spring-mvc