大学生QueryRunner requires a DataSource to be invoked in this way, or a Connection should be passed in
第一次用连接池和commons-dbutils运行的时候报了这个错,因为QueryRunner需要传入数据源或者连接池。我没有传入连接池。错误写法如下:public static final QueryRunner RUNNER = new QueryRunner(); 正确写法如下:public static final QueryRunner RUNNER = QueryRunner(druidDataSource);当然啦,传入的肯定是事先配置好可以用的。...