Apache的骆驼 - 春天DSL - 传递字符串参数bean方法 [英] Apache Camel - Spring DSL - Pass String argument to bean method

查看:151
本文介绍了Apache的骆驼 - 春天DSL - 传递字符串参数bean方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在骆驼2.10.1,以下工作:

On Camel 2.10.1, the following worked:

<camel:bean ref="profilingBean" method="addProfilingContext('TEST')"/>

问题的方法接受一个字符串参数

The method in question takes a String parameter

迁移到2.10.6,这不工作了,它会尝试通话测试作为另一个类。我曾尝试使用$ {}包装,试图用奇异的组合与&amp; QUOT;等等...

Migrating to 2.10.6 , this does not work anymore, it tries to call TEST as another class. I have tried wrapping with ${} , trying to use exotic combinations of "& quot;" etc...

我发现的唯一的解决方案是使用恒定的语言,然后调用使用简单的头把值一个头。显然,这是不是很干净...

The only solution I found was to put the value in a header using constant language then call the header using simple. Obviously, this isn't very clean...

你有什么想法如何做到这一点?

Do you have any ideas how to do this?

干杯

推荐答案

您用头解决方案是好的。请您谈一下这个错误应固定在2.10.7,2.11.1或等。

Your solution with the header is fine. The bug you talk about should be fixed in 2.10.7, or 2.11.1 etc.

这篇关于Apache的骆驼 - 春天DSL - 传递字符串参数bean方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆