我正在使用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