Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
camel_notes [2017/06/15 06:51]
root [Building and Running]
camel_notes [2017/06/16 08:06]
root [Getting Started]
Line 1: Line 1:
 Back [[Home]] Back [[Home]]
 +
 +== Getting Started == 
 +
 +A minimal camel project can look like 
 +
 +<code java>
 +  public static void main(String[] args) {
 +        def camelContext = new DefaultCamelContext()
 +        camelContext.addRoutes(new RouteBuilder() {
 +            def void configure() {
 +                from("​timer://​jdkTimer?​period=3000"​)
 +                        .to("​log://​camelLogger?​level=INFO"​)
 +            }
 +        })
 +        camelContext.start()
 +
 +        addShutdownHook{ camelContext.stop() }
 +        synchronized(this){ this.wait() }
 +    }
 +</​code>​
 +
 +with the gradle dependencies of 
 +
 +<code groovy>
 +def camelVersion = "​2.19.0"​
 +
 +dependencies {
 +    compile "​org.apache.camel:​camel-core:​${camelVersion}"​
 +    compile "​org.apache.camel:​camel-elasticsearch:​${camelVersion}"​
 +    compile "​org.apache.camel:​camel-jdbc:​${camelVersion}"​
 +    compile '​org.slf4j:​slf4j-simple:​1.6.6'​
 +}
 +</​code>​
 +
  
 == Camel and gmail ==  == Camel and gmail == 
 
camel_notes.txt · Last modified: 2017/06/16 08:09 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd