从下面的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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
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.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
">
<context:property-placeholder location="classpath:application.xml"/>
<context:component-scan base-package="cn.sheing.pead.chap12.connleak"/>
<bean class="org.apache.commons.dbcp.BasicDataSource" id="dataSource"
p:driverClassName="${database.driverName}"
p:url="${database.url}"
p:username="${database.username}"
p:password="${database.password}"
destroy-method="close"
/>
<bean class="org.springframework.jdbc.datasource.DataSourceTransactionManager"
id="transactionManager"
p:dataSource-ref="dataSource"/>
<bean class="org.springframework.jdbc.core.JdbcTemplate" id="jdbcTemplate"
p:dataSource-ref="dataSource"/>
<tx:annotation-driven transaction-manager="transactionManager"/>
</beans>
一个一个排除试试
应该是最后面的原因. 原来<context:property-placehole locatio=""/> 的值配置错了. location 修改为指定的properties 文件后正常运行.
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- azee.cn 版权所有 赣ICP备2024042794号-5
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务