我有一个应用程序,可以读取一个文件夹中的文件,更改其内容并将其写回到另一个文件夹中。我正在尝试使用Citrus添加集成测试,以在第一个文件夹中写入一些内容,并在应用程序对其进行修改后检查第二个文件夹中更改的内容。
我的问题与this one非常相似,在答复中说要使用骆驼路线,但是我对这些概念还很陌生,不知道从哪里真正开始...
我不太了解<camelContext>
标签及其工作方式。到目前为止,我已经写了下面的内容,这就是我尝试在文件中写的地方:
<citrus-camel:endpoint id="inputCamelEndpoint" camel-contxt="inputCamelContext" endpoint-uri="file://C:/HL7/source/?fileName=test.hl7"/>
<camelContext id="inputCamelContext" xmlns="http://camel.apache.org/schema/spring">
<route id="inputRoute">
<to uri="file://C:/HL7/source/?fileName=test.hl7"/>
</route>
</camelContext>
<send endpoint="inputCamelEndpoint">
<message type="plaintext">
<data>Hello!</data>
</message>
</send>
我应该为<from uri="">
写些什么?
而且,camelContext
的xmlns属性是否已损坏?我有this error。
我真的希望有人能给我一些有关这一切的细节,我很迷茫。