我在camel.config駱駝配置讀屬性文件中的值
<choice>
<when>
<simple>${BROADBAND_DN_RBSID_SWITCH} == 'DN'</simple>
<to uri="bean:bbGetServiceProfileProcessorByDN"/>
</when>
</choice>
我讀其他文件即spring.properties $ {} BROADBAND_DN_RBSID_SWITCH值 #temp switch BROADBAND_DN_RBSID_SWITCH=DN
但我得到以下定義狂勝以下錯誤
Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[BROADBAND-ROUTES ] [BROADBAND-ROUTES ] [direct://BROADBAND ] [ 380]
[BROADBAND-ROUTES ] [multicast4 ] [multicast ] [ 380]
[BROADBAND-ROUTES ] [choice17 ] [when[simple{${BROADBAND_DN_RBSID_SWITCH} == 'DN'}]choice[] ] [ 14]
Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-INPUSCPC08541-53313-1481817337243-0-29]
at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1696) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.builder.SimpleBuilder.createPredicate(SimpleBuilder.java:104) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.builder.SimpleBuilder.matches(SimpleBuilder.java:83) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:65) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:93) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:468) [camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190) [camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109) [camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.MulticastProcessor.doProcessParallel(MulticastProcessor.java:814) [camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.MulticastProcessor.access$200(MulticastProcessor.java:84) [camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:314) [camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.processor.MulticastProcessor$1.call(MulticastProcessor.java:299) [camel-core-2.17.0.jar:2.17.0]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [?:1.7.0_45]
Caused by: org.apache.camel.language.simple.types.SimpleIllegalSyntaxException: Unknown function: BROADBAND_DN_RBSID_SWITCH at location 0
${BROADBAND_DN_RBSID_SWITCH} == 'DN'
*
at org.apache.camel.language.simple.SimplePredicateParser.parsePredicate(SimplePredicateParser.java:69) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.SimpleLanguage.createPredicate(SimpleLanguage.java:115) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.builder.SimpleBuilder.createPredicate(SimpleBuilder.java:102) ~[camel-core-2.17.0.jar:2.17.0]
... 16 more
Caused by: org.apache.camel.language.simple.types.SimpleParserException: Unknown function: BROADBAND_DN_RBSID_SWITCH
at org.apache.camel.language.simple.ast.SimpleFunctionExpression.createSimpleExpression(SimpleFunctionExpression.java:216) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.ast.SimpleFunctionExpression.createExpression(SimpleFunctionExpression.java:40) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.ast.SimpleFunctionStart.doCreateLiteralExpression(SimpleFunctionStart.java:58) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.ast.SimpleFunctionStart.createExpression(SimpleFunctionStart.java:48) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.ast.BinaryExpression.createExpression(BinaryExpression.java:78) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.SimplePredicateParser.createPredicates(SimplePredicateParser.java:438) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.SimplePredicateParser.doParsePredicate(SimplePredicateParser.java:119) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.SimplePredicateParser.parsePredicate(SimplePredicateParser.java:66) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.language.simple.SimpleLanguage.createPredicate(SimpleLanguage.java:115) ~[camel-core-2.17.0.jar:2.17.0]
at org.apache.camel.builder.SimpleBuilder.createPredicate(SimpleBuilder.java:102) ~[camel-core-2.17.0.jar:2.17.0]
... 16 more