我正在使用Camel的POJO生成例如apache camel @Produce方法使用Object参数而不是字符串
{
public interface MyListener {
String sayHello(String name);
}
public class MyBean {
@Produce(uri = "activemq:foo")
protected MyListener producer;
public void doSomething() {
// lets send a message
String response = producer.sayHello("James");
}
}
}
使用方法的sayHello与用作身体在骆驼字符串对象的接口。但是,如果我尝试使用任何其他对象在这里我从骆驼得到异常说没有找到BeanInvocation for java.io.InputStream的TypeConvertor。
我知道的是对象被允许它会被提到某处。但我想说明为什么这样做,如果有办法解决这个问题。