1. 程式人生 > >Couldn't find a destroy method named 'close' on bean with name 'dataSourceFund'

Couldn't find a destroy method named 'close' on bean with name 'dataSourceFund'

<bean id="dataSourceFund" class="org.springframework.jdbc.datasource.DriverManagerDataSource"
        destroy-method="close">
        <property name="driverClassName" value="${jdbc.driver}" />
        <property name="url" value="${jdbc.fund.url}" />
        <property name="username"
value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> </bean>

改成

<bean id="dataSourceFund" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="${jdbc.driver}" />
        <property
name="url" value="${jdbc.fund.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> </bean>