springMVC- The prefix "mvc" for element "mvc:annotation-driven" is not bound 解决方法

在springmvc配置文件里面写默认的注解映射的支持的时候:

The prefix "mvc" for element "mvc:annotation-driven" is not bound。

特此记录,解决方法。

 在配置文件中的beans中添加

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

xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"


添加后的代码:

xml version="1.0" encoding="UTF-8"?>

<beans xmlns:mvc="http://www.springframework.org/schema/mvc" 

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:context="http://www.springframework.org/schema/context"

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

xsi:schemaLocation="http://www.springframework.org/schema/beans 

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

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

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

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

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

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

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

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

>



你可能感兴趣的:(springmvc)