@Test
public void getUserByName() throws Exception {

    String name="longzhiran";
    String sql = "SELECT * FROM user WHERE USERNAME = ?";
    List<User> list = jdbcTemplate.query(sql, new User(), new Object[]{name});
    for (User user : list) {
        System.out.println(user);
    }
}