simple-el

apache camel simple expression not giving string value

三世轮回 提交于 2019-12-11 02:18:35
问题 I am using apache camel. I am trying to retrieve value from body using simple expression language. I need it as a String but simple returns SimpleBuilder object. So I have tried something like this simple("${body.address.line}").resultType(String.class).getResultType() but it is returning me java.lang.String. please tell me how can I get this expression's result as String? 回答1: That is only for configuring the simple expression. If you need to evaluate it then call the evaluate method String