求大神解答,報錯
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring/spring-dao.xml]: Invocation of init method failed; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. ?Cause: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 16; 文檔根元素 "configuration" 必須匹配 DOCTYPE 根 "mapper"。
Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance. ?Cause: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 16; 文檔根元素 "configuration" 必須匹配 DOCTYPE 根 "mapper"。
Caused by: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 16; 文檔根元素 "configuration" 必須匹配 DOCTYPE 根 "mapper"。
spring-dao.xml
<?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:context="http://www.springframework.org/schema/context"
?xsi:schemaLocation="http://www.springframework.org/schema/beans
?http://www.springframework.org/schema/beans/spring-beans.xsd
?http://www.springframework.org/schema/context?
?http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<context:property-placeholder location="classpath:jdbc.properties"></context:property-placeholder>
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${jdbc.driverClass}"></property>
<property name="jdbcUrl" value="${jdbc.url}"></property>
<property name="user" value="${jdbc.username}"></property>
<property name="password" value="${jdbc.password}"></property>
<!-- c3p0連接池的私有屬性 -->
<property name="maxPoolSize" value="30"></property>
<property name="minPoolSize" value="10"></property>
<!-- 關(guān)閉連接后不自動commit -->
<property name="autoCommitOnClose" value="false"></property>
<!-- 獲取連接超時時間 -->
<property name="checkoutTimeout" value="1000"></property>
<!-- 當獲取連接失敗重試次數(shù) -->
<property name="acquireRetryAttempts" value="2"></property>
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="configLocation" value="classpath:mybatis-config.xml"></property>
<property name="typeAliasesPackage" value="org.seckill.entity"></property>
<property name="mapperLocations" value="classpath:mapper/*.xml"></property>
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
<property name="basePackage" value="org.seckill.dao"></property>
</bean>
</beans>?
2017-06-22
<!DOCTYPE mapper
? PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
? "
去官網(wǎng)把這頭重新?lián)Q掉