用c3p0方式获取的数据源,创建JDBCTmeplate,获取不到连接
private static ComboPooledDataSource ds = new ComboPooledDataSource();
private static JdbcTemplate template=new JdbcTemplate(ds);
public static void main(String[] args)
{
template.queryForInt("select count(*) from poi.poi_category");
}
这样竟然报获取不到连接,这是为何?请大神指教