public static void main(String[] args) {
		
//		ResultSetHandler<Object[]> resultSetHandler = new ResultSetHandler<Object[]>() {
//		    public Object[] handle(ResultSet rs) throws SQLException {
//		        if (!rs.next()) {
//		            return null;
//		        }
//		    
//		        ResultSetMetaData meta = rs.getMetaData();
//		        int cols = meta.getColumnCount();
//		        Object[] result = new Object[cols];
//
//		        for (int i = 0; i < cols; i++) {
//		            result[i] = rs.getObject(i + 1);
//		        }
//
//		        return result;
//		    }
//		};
		
		ResultSetHandler<List<User>> resultSetHandler = new BeanListHandler<User>(User.class);
		
		Connection conn = null;
		try {
			Class.forName("com.mysql.jdbc.Driver");
			conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/mydb", "root", "123456");
			
			QueryRunner run = new QueryRunner();
			
			 List<User> u = run.query(
				        conn, "SELECT * FROM user WHERE id=?", resultSetHandler, "1");
			 
			 
			 System.out.println(u.get(0).getBirthday());
			
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			 try {
				DbUtils.close(conn);
			} catch (SQLException e) {
				e.printStackTrace();
			}  
		}
		
	}