我正在使用 Apache Camel,并且我有一个包含双大括号的端点。
For example: " endpoint {{ valueToBeOverriden }}".
当我调用以下语句时,它会抛出 ResolveEndpointFailedException。
camelContext.getEndpoint(" endpoint {{ valueToBeOverriden }}")
我注意到问题是双花括号:{{。
我怎样才能逃脱它们? 你有什么想法吗?
谢谢, 路易莎
最佳答案
您是否为 Camel 上下文创建了 PropertiesComponent?
例如:
在 Spring XML 中配置 PropertiesComponent
<camelContext ...>
<propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
</camelContext>
您可以访问http://camel.apache.org/using-propertyplaceholder.html获取更多信息。
关于java - Apache Camel 转义双花括号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42974511/