From the course: Spring: Spring Batch
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Writing a JSON file
(upbeat digital music) - [Instructor] Having worked with several ItemWriters and the constructs they follow, this challenge will require you to write a JSON file using a JsonFileItemWriter. Within our project, we're currently reading information regarding shipped orders from the databases SHIPPED_ORDER table. Using the appropriate ItemWriter, create a job that writes the data to a JSON file on the file system. Here's a few hints to get you started. First, make sure you take a look at Spring Batch's documentation. It should include all of the information required to complete the challenge. Second, you should look to utilize the builder for the JsonFileItemWriter. It will simplify the job configuration. This challenge should take you about 15 minutes to complete. In the next video, I'll show you how I solve the challenge, good luck.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.