`
abccyz
  • 浏览: 16655 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

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

 
阅读更多
spring-servlet.xml中添加
<?xml version="1.0" encoding="UTF-8"?>
时候报错解决方法如下:
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="
         http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-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/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
			
			http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"
	>

在beans中加上如下配置就好了

http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
(xsi:schemaLocation中添加)

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics