使用EasyPOI导出excel

这是简单的导出代码


List<FormYbVo> ybList = formYbService.select(formYb);
        try {
            // 设置响应输出的头类型及下载文件的默认名称
            String fileName = new String("demo信息表.xls".getBytes("utf-8"), "ISO-8859-1");
            response.addHeader("Content-Disposition", "attachment;filename=" + fileName);
            response.setContentType("application/vnd.ms-excel;charset=gb2312");
            //导出
            Workbook workbook = ExcelExportUtil
                    .exportExcel(new ExportParams("参保数据信息", "参保学生报表", ExcelType.HSSF), FormYbVo.class, ybList);
            workbook.write(response.getOutputStream());
            log.info("请求 exportExcel end ......");
        } catch (IOException e) {
            log.info("请求 exportExcel 异常:{}", e.getMessage());
        }

报出如下异常

java.lang.IllegalArgumentException: object is not an instance of declaring class

img


可是这个对象实例不是和List元素对象一样吗,请问哪里出错了

看看FormYbVo属性有没有配置getter和setter