这个错误是在使用C3P0包中的QueryRunner时候出现的错误,从错误提示的字面意思是QueryRunner需要一个数据源或者是一个连接。

QueryRunner requires a DataSource to be invoked in this way, or a Connection should be passed in
QueryRunner requires a DataSource to be invoked in this way, or a Connection should be passed in

  我们在QueryRunner构造函数中传入一个数据源就可以了。错误的原因是我忘记了传入。在开发的时候有的地方需要特别小心。

文章为阿伦原创,如果文章有错的地方欢迎指正,大家互相交流。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-15
  • 2022-12-23
  • 2021-12-01
  • 2021-10-31
猜你喜欢
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2021-11-08
  • 2021-11-25
  • 2021-08-02
  • 2022-02-06
相关资源
相似解决方案