---
title: "Spring： Document root element \"beans\", must match DOCTYPE root \"null"
author: "wode66"
date: "2011-07-22T15:09:55Z"
tags: []
categories: ["编程语言"]
slug: "spring-document-root-element-beans-must-match-doctype-root-null"
draft: false
lastmod: "2011-07-22T15:13:19Z"
id: 1130710
url: "https://suo.iteye.com/blog/1130710"
---

Spring： Document root element "beans", must match DOCTYPE root "null

 

      Spring的xml配置文件的声明部分：spring 1.x 使用DOCTYPE，而2.x是用schema。

      项目中所有bean的均使用2.x方式配置，仔细查看/WEB-INF/lib目录下，居然有两个spring.jar，一个是1.x版本的，一个2.x版本的，删掉1.x版本后，一切ok。