148.11. その他の例

148.11.1. プロキシーの設定

Java DSL

from("direct:start")
  .to("http://oldhost?proxyHost=www.myproxy.com&proxyPort=80");

また、proxyUsername および proxyPassword オプションによるプロキシー認証もサポートされています。

148.11.2. URI の外部でプロキシー設定を使用する

Java DSL

Spring DSL

 context.getProperties().put("http.proxyHost", "172.168.18.9");
 context.getProperties().put("http.proxyPort" "8080");
   <camelContext>
       <properties>
           <property key="http.proxyHost" value="172.168.18.9"/>
           <property key="http.proxyPort" value="8080"/>
      </properties>
   </camelContext>

エンドポイントのオプションは、コンテキストのオプションをオーバーライドします。