ItemWriters Flashcards
(9 cards)
What is a FlatFileItemWriter?
It writes data to a flat file like CSV or TXT.
How do you configure a JdbcBatchItemWriter?
By setting a DataSource, sql query, and ItemPreparedStatementSetter.
What is a JpaItemWriter?
An ItemWriter that persists data using JPA.
How can you write an XML file in Spring Batch?
Using StaxEventItemWriter with a Marshaller.
What is MulteResourceItemWriter?
A writer that writes output to multiple files based on logic.
How do you write to a NoSQL database like MongoDB?
Using MongoItemWriter?
How do you write to a REST API in Spring Batch?
By implementing a custom ItemWriter that makes HTTP requests.
How can you use FlatFileItemWriter with dynamic filenames?
By using a ResourceSuffixCreator?
What is JdbcBatchItemWriter used for?
Writing records to a database using batch SQL inserts.