Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception: defaultEndpoint must be specified. For camel AWS SES for direct:start

I am not able to set the default endpoint using annotation. As per the camel docs, it recommends annotation as shown below.

// auto wiring a producer template using endpoint annotation
@Autowired
@EndpointInject(uri="direct:start")
private ProducerTemplate producerTemplate;

// send the body
producerTemplate.sendBody("hi");

Doesn't work. It still complains

"Exception: defaultEndpoint must be specified"

like image 466
41mailuser Avatar asked Jul 10 '15 01:07

41mailuser


1 Answers

You can specify the defaultEndpoint on the ProducerTemplate itself, so something like:

// set the defautlEndPoint
producerTemplate.setDefaultEndpointUri("direct:start");
// send the body
producerTemplate.sendBody("hi");
like image 96
enkor Avatar answered Oct 31 '22 01:10

enkor