@Test public void testMain() throws Exception { String[] args = {}; App.main(args); }
public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(App.class, args); CamelContext camelContext = (CamelContext) context.getBean("camelContext"); camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("{{endpoint}}").log("ENDPOINT: ${body}"); from("{{wireTapEndpoint}}").log("WIRETAPPED ENDPOINT: ${body}"); } }); camelContext.createProducerTemplate().sendBody("{{entry}}", "Test message"); SpringApplication.exit(context); }
App { public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(App.class, args); CamelContext camelContext = (CamelContext) context.getBean("camelContext"); camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("{{endpoint}}").log("ENDPOINT: ${body}"); from("{{wireTapEndpoint}}").log("WIRETAPPED ENDPOINT: ${body}"); } }); camelContext.createProducerTemplate().sendBody("{{entry}}", "Test message"); SpringApplication.exit(context); } }
App { public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(App.class, args); CamelContext camelContext = (CamelContext) context.getBean("camelContext"); camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("{{endpoint}}").log("ENDPOINT: ${body}"); from("{{wireTapEndpoint}}").log("WIRETAPPED ENDPOINT: ${body}"); } }); camelContext.createProducerTemplate().sendBody("{{entry}}", "Test message"); SpringApplication.exit(context); }  }
App { public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(App.class, args); CamelContext camelContext = (CamelContext) context.getBean("camelContext"); camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("{{endpoint}}").log("ENDPOINT: ${body}"); from("{{wireTapEndpoint}}").log("WIRETAPPED ENDPOINT: ${body}"); } }); camelContext.createProducerTemplate().sendBody("{{entry}}", "Test message"); SpringApplication.exit(context); }  static void main(String[] args); }
App { public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(App.class, args); CamelContext camelContext = (CamelContext) context.getBean("camelContext"); camelContext.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { from("{{endpoint}}").log("ENDPOINT: ${body}"); from("{{wireTapEndpoint}}").log("WIRETAPPED ENDPOINT: ${body}"); } }); camelContext.createProducerTemplate().sendBody("{{entry}}", "Test message"); SpringApplication.exit(context); }  static void main(String[] args);  }