I was debating my self whether to use jdbcTemplate vs apache DBUtils in my project. My application is a spring app, where we are using jdbcTemplate for few requests. But i was thinking about this very lightweight and easy to understand Apache DbUtils.
I know both jdbcTemplate and dbutils are abstraction layer on top of regular JDBC which helps us to avoid broiler plate code.
So My questions are:
1) Any strong reason i should convince myself to migrate everything from jdbcTemplate to dbutils?
2)Any Auto POJO mappers in jdbcTemplate which automaps to java POJO class?In DbUtils i know we can do this like below:
ResultSetHandler<List<Object>> beanListHandler = new BeanListHandler<Object>(Object.class, new BasicRowProcessor(new GenerousBeanProcessor()));
I
In jdbcTemplate i know we can have a custom rowMapper where we can explicitly set the properties like below, but is there a way to do auto mapping to POJOS like in dbutils?
@Overides
public Object mapRow(){
//set to Object by calling setters
}
3)Performance wise will it make any difference using dbutils?(As we are already using jdbcTemplate in other requests)
Can anyone suggest the best to chose from these two and why from your experience?