严重: Servlet.service() for servlet [spring] in context with path [/First] threw exception [Request processing failed; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 4 in XML document from URL [file:E:/lib/First/src/main/webapp/WEB-INF/Sping-Database.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ‘beans’.] with root cause
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element ‘beans’.
他妈原来是这样写的
<beansxmlns=“https://www.springframework.org/schema/beans” xmlns:xsi=“https://www.w3.org/2001/XMLSchema-instance”
xsi:schemalocation=“http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd”>
错在哪里呢
把https里的s去掉改为:
<beansxmlns=“http://www.springframework.org/schema/beans”
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-4.2.xsd”>
总结:::所有配置文件头http后面 都不能有s 可能把 有错先看看是不是https开头