作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我无法使用注释设置默认端点。根据 Camel 文档,它建议注释如下所示。
// auto wiring a producer template using endpoint annotation
@Autowired
@EndpointInject(uri="direct:start")
private ProducerTemplate producerTemplate;
// send the body
producerTemplate.sendBody("hi");
不起作用。它仍然提示
"Exception: defaultEndpoint must be specified"
最佳答案
您可以在 ProducerTemplate 本身上指定 defaultEndpoint,例如:
// set the defautlEndPoint
producerTemplate.setDefaultEndpointUri("direct:start");
// send the body
producerTemplate.sendBody("hi");
关于java - 异常 : defaultEndpoint must be specified. 对于 Camel AWS SES for direct:start,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31331226/
我是 Apache Camel 的新手。我正在尝试将 header 连同请求正文一起发送到 Apache Camel 中的路由。 // headers is a map APIResponse res
我正在尝试使用 http://camel.apache.org/mock.html 为我的 Camel 路线创建测试用例.我需要验证 route 的处理器。但是简单的测试对我不起作用。 public
我无法使用注释设置默认端点。根据 Camel 文档,它建议注释如下所示。 // auto wiring a producer template using endpoint annotation @A
我是一名优秀的程序员,十分优秀!