亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

駱駝從屬性文件中轉義特殊字符

駱駝從屬性文件中轉義特殊字符

ibeautiful 2023-10-13 09:47:28
我在屬性文件中有一個密碼com.password=$&m它被插入到 sftp 駱駝路由中{{com.password}},我得到了"Unknown parameters=[{m=}]"& 被錯誤地解釋。我嘗試了一些方法,但在文檔中找不到任何內容。我該怎么做才能讓它逐字使用密碼?編輯:<cm:property-placeholder id="blueprint.placeholder" persistent-id="com.props" ></cm:property-placeholder>路線:<camel:route id="uploadqueue">      <camel:from uri="file://{{com.dir}}/?antInclude=*.xml&amp;delay=10000&amp;move=processed/${file:name}&amp;moveFailed=error/${file:name}" />    <camel:to uri="log:input?showAll=true&amp;level=INFO"/>    <camel:to uri="sftp://192.168.0.1/?username={{com.user}}&amp;password={{com.password}}" /></camel:route>編輯:現在路線: <camel:to uri="sftp://192.168.0.1/?username={{com.user}}&amp;password=RAW({{com.password}})" />堆棧跟蹤。出于保密原因略有編輯,但基本上就是這樣。$&m 的密碼被解釋為 $ 的 HTML (%24),即密碼,& 作為語義與符號,m 作為新參數。即 RAW() 什么也沒做。Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: sftp://192.168.0.1/?password=%24&m=&username=USERNAME due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{m=}]    at org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:215) ~[?:?]    at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:139) ~[?:?]    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:711) ~[?:?]    at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80) ~[?:?]    at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:219) ~[?:?]    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:115) ~[?:?]    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:121) ~[?:?]
查看完整描述

1 回答

?
慕虎7371278

TA貢獻1802條經驗 獲得超4個贊

這應該有效。

<camel:to?uri="sftp://192.168.0.1/?username={{com.user}}&amp;password=RAW({{com.password}})"



查看完整回答
反對 回復 2023-10-13
  • 1 回答
  • 0 關注
  • 144 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號