Spring 报错:解析xml失败
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEbeanPUBLIC"-//SPRING//DTDBEAN//EN""http:...
<?xml version="1.0" encoding="UTF-8"?>
<! DOCTYPE bean PUBLIC"-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-bean.dtd">
<bean>
<bean id = "message" classv= "com.vo.Message">
<property name = "message">
<value>Hello Spring!</value>
</property>
</bean>
</bean>
现在报这个错了Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Line 2 in XML document from class path resource [springtest.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed. 展开
<! DOCTYPE bean PUBLIC"-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-bean.dtd">
<bean>
<bean id = "message" classv= "com.vo.Message">
<property name = "message">
<value>Hello Spring!</value>
</property>
</bean>
</bean>
现在报这个错了Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Line 2 in XML document from class path resource [springtest.xml] is invalid; nested exception is org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed. 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询