Skip to content

javabyraghu/SpringBoot2BatchCsvToMongoDb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;
} \