第 365 章 Weather 组件

作为 Camel 2.12 版本提供

weather: 组件用于轮询 Open Weather Map 的天气信息,提供免费的全球天气和预测信息。这些信息返回为 json String 对象。

默认情况下,Camel 将轮询当前天气和每小时一次的更新。它还可用来根据作为制作者定义的端点上定义的参数来查询 weather api。

Maven 用户需要将以下依赖项添加到其 pom.xml 中:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-weather</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>

365.1. URI 格式

weather://<unused name>[?options]