简体   繁体   中英

Store large amount of data to Database using Spring Batch

  • I'm having large amount of data to verify. Then setting in an object and finally save in database one by one. So it's consuming much time. I'm planning to use Spring Batch to store that large amount of data after processing in a single shot. By this I can eliminate the time taking to talk with db each time.
  • Can I store the whole data in a list and store with Spring batch or there is any other way? Please help me with any example.
  • Coading Language - Java - struts

  • Database - MySql Server

Store large amount of data

Can I store the whole data in a list

If your "large amount" of data fits in memory then you can do that. But I'm not sure this is the way to go if your data is big enough and would not fit in memory.

The idea of chunk oriented processing in Spring Batch is to not load the whole data set in memory but to load it in chunks. This model is robust and can handle any amount of input data with a low memory footprint (only the chunk size items are loaded in memory).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM