问答详情
源自:5-1 spring与hibernate的整合测试

Junit报错,请大神帮我看看,谢谢

Junit错误:

org.springframework.beans.factory.BeanDefinitionStoreException: Line 5 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".
org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 73; Document root element "beans", must match DOCTYPE root "null".	

Spring的配置:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"    
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    
    xmlns:p="http://www.springframework.org/schema/p"    
    xsi:schemaLocation="http://www.springframework.org/schema/beans        
        http://www.springframework.org/schema/beans/spring-beans.xsd" >        	
    <bean id="date" class="java.util.Date"></bean>	
</beans>



提问者:syousyou 2018-05-19 14:22

个回答

  • 慕少8076630
    2018-05-25 14:56:31
    已采纳

    缺少spring的jar包