Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleMyRouteBuilder.java
...
   from('direct:test')
      .transform(new Expression() {
         @Override
         public Object evaluate(Exchange e) {
            return new StringBuffer(e.getIn().getBody().toString()).reverse().toString();
         }
      });
   }
...

Using Closures

Using Groovy XML processing

Custom DSL extensions

Developing with the Groovy DSL

...

Code Block
xml
xml
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>
    <configuration>
      <additionalProjectnatures>
        <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature>
      </additionalProjectnatures>
      <classpathContainers>
        <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
        <classpathContainer>GROOVY_DSL_SUPPORT</classpathContainer>
      </classpathContainers>              
    </configuration>
  </plugin>	  

Using Closures in your routes

Using Groovy XML processing

Using Groovy GStrings

Custom DSL extensions