使用Camel和spring boot将文件插入数据库。

问题描述 投票:1回答:1

我已经编写了路由,使用Camel将文件从源目录移动到目标目录。我需要一些帮助来将这些文件数据移动到数据库中。这是一个将文件从一个目录移动到另一个目录的路由。

public class Camelroute extends RouteBuilder {

    @Override
    public void configure() throws Exception {
          copytextfiles();

    }
    public void copytextfiles()
    {
        from("file:input?include=.*\\.txt").to("file:output\\text");

    }

}

spring-boot apache-camel
1个回答
0
投票

我有一个你所需要的基本应用。

https:/github.comspathak19csv-jdbc-demo。

© www.soinside.com 2019 - 2024. All rights reserved.