Remove boilerplate from db code

后端 未结 5 1043
深忆病人
深忆病人 2021-01-12 09:17

It seems that every time I want to perform a db query, I have to write the following:

Connection conn = null;
Statement stmt = null;
ResultSet rset = null;

         


        
5条回答
  •  别那么骄傲
    2021-01-12 10:18

    DbUtils is a very useful framework, I've used it for smaller projects where Spring and Hibernate are overkill. It's able to do some object mapping as well.

提交回复
热议问题