public void testRun() { FetchSource source = new MicrobellFetchSource(new MicrobellReportParser()); task = new ReportListFetchTask(source); // 先初始化数据,然后进行处理 source.initListPages(); task.run(); System.out.println(source.getReports()); }
public void testRun() { IrmReportDAO reportDAO = (IrmReportDAO) this.getContext().getBean("irmReportDao"); FetchSource source = (FetchSource) this.getContext().getBean("source"); // FetchSource source = new MicrobellFetchSource(new MicrobellReportParser()); // source.setReportDAO(reportReadDAO);this.getContext() ReportMarker marker = (ReportMarker) this.getContext().getBean("marker"); task = new ReportFinalFetchTask(source, reportDAO, marker); // 先初始化数据,然后进行处理 source.initListPages(); ReportListFetchTask ltask = new ReportListFetchTask(source); // 生产列表页面 ltask.run(); System.out.println(source.getReports()); // 生产最终页面 task.run(); System.out.println(source.getReports()); }