使用 Apache Camel 升级 2.25+ 时交换属性映射到速度模板时出错

问题描述 投票:0回答:1

我在 Spring boot 应用程序上将 Apache Camel 速度升级到 2.25.4 现在我无法从速度模板访问交换属性。仅检索模板而没有值。

应用程序可以与 org.apache.camel:camel-velocity:2.24.3 配合使用(2.25+ 速度库会出现此错误)

我正在使用 org.apache.velocity.tools.generic.EscapeTool

以下是使用的相关依赖:

"org.apache.camel:camel-core:2.25.4"
"org.apache.camel:camel-velocity:2.25.4"
"org.apache.velocity:velocity-engine-core:2.3"
"org.apache.velocity.tools:velocity-tools-generic:3.1"

如何修复此错误?

java spring-boot apache-camel velocity camel-routes
1个回答
0
投票

就我而言,我将camel从2.x升级到3.x。 升级后,速度模板无法检索交换属性。 我将 allowedContextMapAll=true 添加为速度 uri 的查询参数 解决了我的问题。

© www.soinside.com 2019 - 2024. All rights reserved.