java - 异常 : defaultEndpoint must be specified. 对于 Camel AWS SES for direct:start

标签 java amazon-web-services apache-camel

我无法使用注释设置默认端点。根据 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/

相关文章:

java - 如何让 java webservices 使用扩展类

hadoop - AWS EMR Hadoop管理

apache-camel - Camel - 保留消息的副本

java - apache Camel 邮件中的主题 header 显示日语字符为 "=?iso-2022-jp.. "

apache-camel - 整数属性验证错误( Camel )

java - 如何跟踪/记录实体变更的版本

java - 如何在 Apache Beam Java 中将 TestStreams 与多输出类一起使用

java - 如何使用java在outlook中准备(而不是发送)电子邮件?

amazon-web-services - AWS Application Load Balancer 健康检查失败

python - 使用 S3 网站源的 Cloudfront 对流层模板