1. 程式人生 > >Intellij IDEA配置springMVC時提示"context:component-scan" is not bound

Intellij IDEA配置springMVC時提示"context:component-scan" is not bound

xxx-servlet.xml配置
<context:component-scan base-package="包名" />

時,報錯:The prefix "context" for element "context:component-scan" is not bound.

因為少了屬性說明


下面是需要新增的文字:

xmlns:context="http://www.springframework.org/schema/context"


http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context-3.0.xsd