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

I am unable to set the default endpoint using annotation. According to camel docs, he recommends annotation as below.

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

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

      

Does not work. He still complains

"Exception: defaultEndpoint must be specified"

+3


source to share


1 answer


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



// set the defautlEndPoint
producerTemplate.setDefaultEndpointUri("direct:start");
// send the body
producerTemplate.sendBody("hi");

      

+3


source







All Articles