Intellij IDEA 創(chuàng)建Spring時(shí),遇到的一些小問題

最近想學(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里面加才行

這樣就可以了

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容