我正在使用Spring 3.2.6并尝试使用该标记。问题是Eclipse似乎无法找到mvc命名空间。 这里是我的XML:Eclipse无法解析Spring 3 mvc模式
<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和上下文前缀可以完成,我的classpath中有spring-webmvc-3.2.6.jar。 任何帮助将非常感激。格雷特斯,亚历克斯
我建议你检查一下你是否支持一些防止eclipse检查远程xsd资源的公司防火墙 –
不,那不是。我可以看到窗口>首选项>网络连接>缓存中列出的模式。 – Alexx