最近想學一下JAVA后臺,在網(wǎng)上找了一些教程看,根據(jù)教程操作遇到了一些問題,在此記錄一下
The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'
最開始遇到這個問題,
把servlet里面的xmlns:context="http://www.springframework.org/schema/tool"?
改成
xmlns:context ="http://www.springframework.org/schema/context"
就好
啟動服務的時候,報?
SpringMVC 出現(xiàn)通配符的匹配很全面, 但無法找到元素 'context:component-scan' 的聲明。
這個錯誤
網(wǎng)上很多都是說在applicationContext里面加
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd"
試了很久都不行,最后在servlet里面加才行

這樣就可以了