读书人

3、Failed to convert property value

发布时间: 2012-11-13 10:00:50 作者: rapoo

三、Failed to convert property value of type [org.apache.commons.dbcp.BasicDataSource] to required

private JdbcTemplate template;    public void setTemplate(DataSource dataSource){        //相当于this.getJdbcTemplate()        template = new JdbcTemplate(dataSource);            }


引入DataSource类出错:

import sun.jdbc.odbc.ee.DataSource;

正确的应该是:
import javax.sql.DataSource;

读书人网 >其他数据库

热点推荐