我想知道是否可以使用 Spring Batch,以便从 一个 Excel 文件并将其保存在数据库中。
备注:Excel文件的内容每2小时更改一次。
如果 Spring Batch 无法实现,我还能使用什么其他解决方案
最佳答案
去看看spring-batch-extensions for Excel .您将找到 ExcelItemReader 和 ExcelItemWriter 的一些示例。
下面是Excel的spring-batch-extensions项目介绍:
Spring Batch extension which contains ItemReader implementations for Excel. Support for both JExcel and Apache POI is available. Simple xls documents can be read with both implementations, however for reading the newer xlsx format Apache POI is required.
你只需要 import sources into your IDE并使用它们。
关于database - 要读取 Excel,我们可以使用 Spring 批处理吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30954931/