今天写spring配置文件web.xml的时候出现 cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib 的错误,查资料后发现的命令空间引入的问题
解决方法很简单,把
http://www.springmodules.org/schema/cache/springmodules-cache.xsd
复制到头文件中的xmlns:xsi里就行了
下面附上代码,粗体部分为目标位置,粗体加斜体加删除线为需要复制的数据
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance http://www.springmodules.org/schema/cache/springmodules-cache.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">