【发布时间】:2021-08-13 06:19:35
【问题描述】:
我正在将我们的项目从 Camel 2.24.1 迁移到 3.6.0。在代码中我们使用了 BeanInvocation,我们提到了在 bean 中调用的方法以及方法中的其他类。
org.apache.camel.component.bean.BeanInvocation 在 2.24.2 之后被弃用。
有没有其他方法可以实现这一点。
public void buildRequest(Exchange exchange) {
BeanInvocation beanInvocation = new BeanInvocation();
beanInvocation.setMethod(ExampleBean.class.getMethod("methodName", param1, param2);
....
....
// Add the arguments to the bean invocation
beanInvocation.setArgs(args);
// Set the bean invocation object as the message body
exchange.getIn().setBody(beanInvocation);
}
P.S:我是骆驼的新手,并试图理解这些概念。
【问题讨论】:
-
你能告诉我们你完整的骆驼路线,以便我们提出一些替代方案吗?
标签: java reflection apache-camel spring-camel