亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

求大神解答,報錯

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>

<!-- 關閉連接后不自動commit -->

<property name="autoCommitOnClose" value="false"></property>

<!-- 獲取連接超時時間 -->

<property name="checkoutTimeout" value="1000"></property>

<!-- 當獲取連接失敗重試次數 -->

<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>?


正在回答

1 回答

舉報

0/150
提交
取消

求大神解答,報錯

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號