【问题标题】:Spring Batch : Read from database and post to third party webserivceSpring Batch:从数据库读取并发布到第三方 Web 服务
【发布时间】:2017-05-27 02:35:47
【问题描述】:

我需要开发一个应用程序来使用 Spring Batch 执行以下活动。从数据库中读取数据 --> 处理数据并准备 REST API 请求 --> 写入或发布到第三方 RESTful 服务。

我已经看到了很多从数据库读取写入 CSV、DB、JMS 的示例。 但我没有找到任何写入 Web 服务的选项。是否可以使用弹簧批处理执行此活动,或者请建议其他一些技术。

【问题讨论】:

标签: spring spring-integration spring-batch


【解决方案1】:

Spring Batch 没有RestItemReader,因为对于我们需要发送的内容来说可能性太大了。话虽如此,编写自己的 ItemWriter 实现并使用 RestTemplate 发送数据将非常简单。

【讨论】:

    猜你喜欢
    • 2021-07-10
    • 2020-08-15
    • 1970-01-01
    • 1970-01-01
    • 2016-05-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多