Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何检索骆驼路由XML中的exchange属性?_Java_Xml_Apache Camel - Fatal编程技术网

Java 如何检索骆驼路由XML中的exchange属性?

Java 如何检索骆驼路由XML中的exchange属性?,java,xml,apache-camel,Java,Xml,Apache Camel,我得在路线上绕一圈。我的路线看起来像 <camel:loop> <camel:constant>${property.x}</camel:constant> </camel:loop> 运行此命令时,请输入x=4的值。我希望访问骆驼路线XML文件中的x Date date = new Date(); this.LOGGER .info("\n****WELCOME TO THE REQUEST OF

我得在路线上绕一圈。我的路线看起来像

<camel:loop>
      <camel:constant>${property.x}</camel:constant> 
</camel:loop>
运行此命令时,请输入x=4的值。我希望访问骆驼路线XML文件中的x

Date date = new Date();
    this.LOGGER
            .info("\n****WELCOME TO THE REQUEST OF CHECK PROCESSOR**");
    int y=4;
    Integer a=new Integer(y);
    exchange.setProperty(x,a);
    int k=(Integer) exchange.getProperty(x);
    this.LOGGER
    .info("\n***WELCOME TO THE REQUEST OF CHECK PROCESSOR ENDINGGGGGGGG***"+"a=   "+a+"  Y=  "+y+"  x=   "+exchange.getProperty(x)+"  k=  "+k);