Giriş
Şu satırı dahil ederiz.
Örnek
Şöyle yaparız.
Şu satırı dahil ederiz.
import org.springframework.batch.item.ItemWriter;Kodu şöyle
public interface ItemReader<T> {
  T read() throws Exception, UnexpectedInputException, ParseException,
    NonTransientResourceException;
}read metodu
Şöyle yaparız.
public class PersonReader implements ItemReader<PersonInput> {
  private List<PersonInput> items;
  private int count = 0;
  
  @Override
  public PersonInput read() {
    if (count < items.size()) {
      return items.get(count++);
    }
    return null;
  }
} 
Hiç yorum yok:
Yorum Gönder