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

這樣就可以了