ApplicationContext CTX = new Classpathxmlapplicationcontext ("Test.xml"); error
When you start spring, the following error is reported,
The reason is that the version of the XSD in XML is not configured inconsistently, I'm using spring-2.5.6, but the configuration file has a 3.0. You can change it as follows:
[XHTML]View plain copy < param name= "allowfullscreen" value= "false" >< param name= "wmode" value= "Transparent" >
- <? Xml version= "1.0" Encoding= "UTF-8" ?>
- <beans Xmlns= "Http://www.springframework.org/schema/beans" &NBSP;&NBSP;
- xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "&NBSP;&NBSP;
- xsi:schemalocation=>
In addition, when configuring, pay attention to the encoding of the configuration file, otherwise, when compiling, the output encoding and your configuration file encoding inconsistent, will produce garbled files.
(Spring loads XML) Org.xml.sax.saxparseexception:cvc-elt.1:cannot find the declaration of element ' beans '.