Apache Commons DbUtils 1.6 发布,主要改进内容包括:
ArrayHandler should return an empty array when handle has no rows Fixes DBUTILS-110.
Order of columns not retained in BasicRowProcessor with HashMap Fixes DBUTILS-114.
BeanProcessor not returning nanoseconds Fixes DBUTILS-118.
Add support for conversion of ResultSet strings to enums in the BeanProcessor Fixes DBUTILS-113.
In BeanProcessor#isCompatibleType, can Integer.class.isInstance(value) be replaced by value instanceof Integer (etc)? Simplified code by using instanceof. Fixes DBUTILS-85.
DBUtils can't build using JDK 1.7 - DriverProxy needs to implement getParentLogger() Add dynamic invocation. Fixes DBUTILS-106.
Create functionality to return auto-generated keys in batches of SQL inserts Fixes DBUTILS-108.
Patch QueryLoader to also load from XML properties files Fixes DBUTILS-107.
Updated the use of getColumnName to try getColumnLabel first Fixes DBUTILS-100.
Add missing JavaDoc to QueryRunner#insert Fixes DBUTILS-98.
Add an Abstract ResultSetHandler implementation in order to reduce redundant 'resultSet' variable invocation Fixes DBUTILS-97.
DbUtils#loadDriver(ClassLoader,String) makes DriverManager throwing "No suitable driver found for jdbc" if ClassLoader is not the System's one Fixes DBUTILS-96.
Added insert methods to QueryRunner and AsyncQueryRunner that return the generated key. Fixes DBUTILS-87.
此版本源代码和二进制包都已提供下载:http://commons.apache.org/proper/commons-dbutils/download_dbutils.cgi
更多更新内容请看http://commons.apache.org/proper/commons-dbutils/changes-report.html。
原则上这不能说是一个持久层框架,它提供了一些Jdbc的操作封装来简化数据查询和记录读取操作。本站就是采用这个项目来读写数据库,代码非常简洁,如果你厌烦了Hibernate的庞大,不妨可以试试----DbUtils。
JavaDoc:http://tool.oschina.net/apidocs/apidoc?api=commons-dbutils
本站对 dbutils 做了一个改进,下载地址:http://www.oschina.net/uploads/app/commons-dbutils-1.1.fixed.jar
主要解决了dbutils无法处理类似 SELECT userid AS id FROM osc_users 诸如此类的问题,因为 dbutils 使用的方法是 getColumnName 而不是 getColumnLabel (此问题已经在官方的1.3版本中得以解决)。
来自:开源中国社区
Linux系统教程:http://www.linuxdiyf.com/linux/

