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

camel-sql - allow using the $simple{} syntax for query arguments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.18.3
    • 2.18.4
    • camel-sql
    • None
    • Unknown

    Description

      The $simple{} syntax is useful to avoid clash with spring property placeholders. The camel-sql component does not recognize it, so when users create endpoints like:

      <to id="_to1" uri="sql:select * from accounts where customerid = :#${header.xxx}?dataSource=dataSource"/>
      

      I.e. use the id field and the "${header.xxx}" syntax, spring tries to find a property named "header.xxx" and crashes.

      We should allow writing:

      <to id="_to1" uri="sql:select * from accounts where customerid = :#$simple{header.xxx}?dataSource=dataSource"/>
      

      Attachments

        Activity

          People

            nferraro Nicola Ferraro
            nferraro Nicola Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: