Java – how to convert exchange attributes to uppercase in ‘simple’?
•
Java
How do I convert attributes on Apache camel exchange to uppercase in the Apache camel expression language?
for example
.when(simple("${property.countryCode.toUpperCase} regex 'NO?'"))
But I get:
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: .toUpperCase on null
I have passed Log ("${property. Countrycode}") confirms that my property does exist
It shouldn't be so difficult to get touppercase in Apache simple (but it does)
I don't want to use touppercase, or groovy, or anything else in Java - there must be an easier way
Solution
attempt
.when(simple("${property.countryCode.toUpperCase()} regex 'NO?'"))
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码