基于内容的路由问题

Issue with Content Based routing

您好,我正在尝试根据 header 值

路由到两个不同的速度模板文件
public void configure() throws Exception {
    from("direct:csi:aaa").bean(bbb.class, "transform").wireTap("direct:auditlog:request").choice()
            .when().simple("${in.header.ccc == 'true'}").to("velocity:vm/ddd.vm").otherwise()
            .to("velocity:vm/eee.vm").end().to("http4://headeruri?throwExceptionOnFailure=false")
            .convertBodyTo(String.class).wireTap("direct:auditlog:response")
            .bean(bbb.class, "processResponse").routeId("zzzRouteBuilder");
}

交易所在 header 中有 ccc,这是真的,但它仍然需要 eee.vm

简单定义有错误,应该是:

.when().simple("${in.header.ccc} == 'true'")

或更简单的:

.when().simple("${in.header.ccc}")