Skip to content

Instantly share code, notes, and snippets.

@alexandre-touret
Last active April 10, 2018 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandre-touret/470b84ac760c4f70d093753c63ec153b to your computer and use it in GitHub Desktop.
Save alexandre-touret/470b84ac760c4f70d093753c63ec153b to your computer and use it in GitHub Desktop.
consumer.url=jpa://samples.camel.model.Address?consumeDelete=false
producer.url=file:target/test?allowNullBody=true&fileExist=append
@Component
public class DbRouteBuilder extends RouteBuilder {
@Value("${consumer.url}")
private String consumerUrl;
@Value("${producer.url}")
private String producerUrl;
@Override
public void configure() throws Exception {
from(consumerUrl)
.log(LoggingLevel.TRACE, "Processing ${id}")
//.bean(new AddressBean(), "log")
.marshal().json()
.to(producerUrl);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment