三、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;