camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Okello Nelson <>
Subject Bindy: Specify value of @DataField annotation using property placeholders
Date Mon, 15 Apr 2013 06:15:46 GMT
Hi Guys,

I'm using Bindy to unmarshall a CSV file. My model class looks something
like this:

@CsvRecord( separator = "\\|", skipFirstLine = true)
@XmlRootElement( name = "SampleModel" )
public class SampleModel {

          @DataField( pos = 1 )
          private String field1;

         @DataField( pos = 2 )
         private Date field2;

Whereas this works fine, I'd like to specify the value of the @DataField
annotation in an external file, and have it look like:

@DataField( pos = "${field1.pos}")
private String field1;

where "pos" takes the value of "${field1.pos}" as specified in an external
properties file, instead of specifying a value directly in the model class.
Is this possible?

Kind Regards,
Okello Nelson.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message