解决方法:
在jdbcTemplate对象中有参数sql和BeanPropertyRowMapper对象:
List<Student> students = jdbcTemplate.query(sql, new BeanPropertyRowMapper());
在BeanPropertyRowMapper对象中加入需要query的实体类的class类
List<Student> students = jdbcTemplate.query(sql, new BeanPropertyRowMapper(Student.class));