如何使用反应方式将 CSV 文件导入 MongoDB?
How to import a CVS file into a MongoDB using reactive way?
正如标题所说,我正在尝试读取一个 cvs 文件,其中包含数以千计的各自国家的 ip 地址。我想使用 WebFlux 将 cvs 文件导入 MongoDB。我一直无法找到有关如何执行此操作的任何资源。我遇到过 Spring Batch,但我认为它不支持 WebFlux。
我想到实现此目的的一种方法是读取 CVS 文件、解析文件、创建具有值的 DTO,然后将其保存到数据库中,但是,我担心性能。
Spring WebFlux 是 Spring MVC 模块的替代品。它不适合数据处理。所以如果你想解决你的问题,使用这种方式:
One way I thought of achieving this is just read the CVS file, parse the file, create DTO with values then save it into the database, however, I worry about performance.
并且 "reactive way" 不会因为 "reactive".
而比批处理更快
正如标题所说,我正在尝试读取一个 cvs 文件,其中包含数以千计的各自国家的 ip 地址。我想使用 WebFlux 将 cvs 文件导入 MongoDB。我一直无法找到有关如何执行此操作的任何资源。我遇到过 Spring Batch,但我认为它不支持 WebFlux。
我想到实现此目的的一种方法是读取 CVS 文件、解析文件、创建具有值的 DTO,然后将其保存到数据库中,但是,我担心性能。
Spring WebFlux 是 Spring MVC 模块的替代品。它不适合数据处理。所以如果你想解决你的问题,使用这种方式:
One way I thought of achieving this is just read the CVS file, parse the file, create DTO with values then save it into the database, however, I worry about performance.
并且 "reactive way" 不会因为 "reactive".
而比批处理更快