这段代码:
@Service
public class IvsImport {
private Logger logger = Logger.getLogger(IvsImport.class);
@Autowired
FileReader fileReader;
@Autowired
ValueProcessorProvider provider;
CSVEntryParser<IvsBerichtPojo> entryParser = new AnnotationEntryParser<IvsBerichtPojo>(IvsBerichtPojo.class, provider);
CSVReader<IvsBerichtPojo> ivsBerichtReader = new CSVReaderBuilder<IvsBerichtPojo>(fileReader).entryParser(entryParser).build();
public IvsImport(){}
public FileReader getFileReader() {
return fileReader;
}
public void setFileReader(FileReader fileReader) {
this.fileReader = fileReader;
}
Iterator<IvsBerichtPojo> it = ivsBerichtReader.iterator(); //this } is not OK????
while(it.hasNext()) {
IvsBerichtPojo bericht = it.next();
logger.info(bericht.getScheepsNummer());
}
} //and here?????
在迭代器声明之后和最后一个大括号处给我一个语法错误:
Syntax error, insert "}" to complete ClassBody
但是当我这样做时,什么都没有改变....
请帮忙!