Skip to content

Latest commit

 

History

History
16 lines (15 loc) · 499 Bytes

README.md

File metadata and controls

16 lines (15 loc) · 499 Bytes

SpringBoot2BatchCsvToMongoDb

Spring Boot Batch Procecssing CSV to MongoDB

To Get Data From MongoDB

#3 From MongoDB
@Bean
public MongoItemReader reader() {
MongoItemReader reader = new MongoItemReader<>();
reader.setTemplate(mongoTemplate);
reader.setSort(new HashMap<String, Sort.Direction>() {{
put("_id", Direction.DESC);
}});
reader.setTargetType(Employee.class);
reader.setQuery("{}");
return reader;
} \