I have a property in my property file:
glob.dev_environment=true
or
glob.dev_environment=false
Now I've tried the following:
<route id="emailMonitor" autoStartup="${!glob.dev_environment}">
<from uri="{{imapURL}}" />
<bean ref="attachmentProcessor"/>
</route>
<route id="emailMonitor" autoStartup="${not glob.dev_environment}">
<from uri="{{imapURL}}" />
<bean ref="attachmentProcessor"/>
</route>
<route id="emailMonitor" autoStartup="{{!glob.dev_environment}}">
<from uri="{{imapURL}}" />
<bean ref="attachmentProcessor"/>
</route>
<route id="emailMonitor" autoStartup="{{not glob.dev_environment}}">
<from uri="{{imapURL}}" />
<bean ref="attachmentProcessor"/>
</route>
<route id="emailMonitor" autoStartup="{{glob.dev_environment == 'false'}}">
<from uri="{{imapURL}}" />
<bean ref="attachmentProcessor"/>
</route>
<route id="emailMonitor" prop:autoStartup="!glob.dev_environment">
<from uri="{{imapURL}}" />
<bean ref="attachmentProcessor"/>
</route>
I'm going a bit crazy here. How do I get it to evaluate a boolean in XML DSL? Yes, I've read this section , and this section . I bet changing to glob.prod_environment
would make this easier, because the XML DSL probably can't handle boolean operations. Am I right? Is that what's going on?
As per comments above...
Camel property value negation only works in v3.x. The prop: prefix doesn't seem to work in v2.x either.
Workaround solution was to use a property that didn't require negation.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.