今天的内容:
了解了DBUtils:
DBUtils封装了JDBC的操作,核心功能如下:
Dbutils三个核心功能介绍
- QueryRunner中提供对sql语句操作的API.
- ResultSetHandler接口,用于定义select操作后,怎样封装结果集.
- DbUtils类是一个工具类,定义了关闭资源与事务处理的方法
QueryRunner核心类:
- QueryRunner(DataSource ds) ;传入参数为连接池
- update(String sql, Object… params) ,执行insert update delete操作
- query(String sql, ResultSetHandler rsh, Object… params) ,执行 select操作
问题:无
明天的打算:继续学习JavaWeb的相关内容