Apache Camel:从资源设置正文

YMA*_*YMA 4 spring classpath apache-camel

基本上,我正在尝试这样做(错误的代码!):

  <camel:setBody>
    <camel:simple>resource:classpath:/myfiles/file.xml</camel:simple>
  </camel:setBody>
Run Code Online (Sandbox Code Playgroud)

你会怎么做到这一点?

干杯!

Cla*_*sen 10

你可以试试

<to uri="language:constant:resource:classpath:/myfiles/file.xml"/>
Run Code Online (Sandbox Code Playgroud)

要使用语言组件:http://camel.apache.org/language.html 要加载内容.