Apache camel 条件运算符和简单表达式中的条件运算符在Camel中不起作用
我只想在rest url中使用filter的paramid和name值都是Apache camel 条件运算符和简单表达式中的条件运算符在Camel中不起作用,apache-camel,Apache Camel,我只想在rest url中使用filter的paramid和name值都是null的情况下显示日志,但对于所有执行的情况都是如此 只有在以下情况下才应执行该块 http://localhost:9098/myapi/student?age=12 但即使条件失败,过滤器也总是被执行 对于url案例,如下所示 http://localhost:9098/myapi/student?id=100&age=16 http://localhost:9098/myapi/student?name
null
的情况下显示日志,但对于所有执行的情况都是如此
只有在以下情况下才应执行该块
http://localhost:9098/myapi/student?age=12
但即使条件失败,过滤器也总是被执行
对于url案例,如下所示
http://localhost:9098/myapi/student?id=100&age=16
http://localhost:9098/myapi/student?name=john&age=12
这里的id/name参数不为null
代码
“${in.header.name}==null和${in.header.id}==null”
有什么建议吗?如果你学习简单语言的文档,那么它会说你必须在操作符周围使用空格。它也不应该出现在引用中 这个
“${in.header.name}==null和${in.header.id}==null”
应该是
<simple>${in.header.name} == null and ${in.header.id} == null</simple>
${in.header.name}==null和${in.header.id}==null
谢谢:)克劳斯·易卜生,我以前没有引用过。这是空间问题。已解决:)
<simple>" ${in.header.name} == null and ${in.header.id}==null"</simple>
<simple>${in.header.name} == null and ${in.header.id} == null</simple>