Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11230

Allow to configure the prefix/suffix used for languages

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • 3.0.0
    • camel-core, camel-language
    • None
    • Advanced

    Description

      It would be nice to have a way to configure the prefix/suffix used to parse languages so that an user can change the defaults in case they clash with other systems or because of personal preferences:

      i.e.

      XML Dsl
      <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
          <languages>
              <language id="properties" prefix="{{" suffix="}}"/>
              <language id="simple"     prefix="[[" suffix="]]"/>
              <language id="groovy"     prefix="<<" suffix=">>"/>
          </languages>
      
          <route>
              <from uri="timer:{{timer.name}}"/>
              <log message="Body is [[body]]"/>
              <log message="Body is <<exchange.in.body>>"/>
          </route>
      </camelContext>
      
      Spring Boot properties
      camel.language.properties.prefix = {{
      camel.language.properties.suffix = {{
      
      camel.language.simple.prefix = [[
      camel.language.simple.suffix = ]]
      
      camel.language.groovy.prefix = <<
      camel.language.groovy.suffix = >>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            lb Luca Burgazzoli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: