You may use the following syntax: .unmarshall().bindy(BindyType.Csv,Your
Class.class)
Bear in mind that the current implementation does scan the package of the
viventi class thus you should not have any other bindy-annotated class in
the same root package.
On Monday, February 25, 2013, jeff wrote:
> Thanks @Claus for the help, but it don't works too...
>
> I have found a solution which consist to retrieve the bean from the context
> from the routebuilder :
>
> spring bean xml :
> <bean id="cSVLineFormatAED" class="com.myapp...package.CSVLineFormatAED">
>
>
> @CsvRecord(separator = ";" , crlf = "UNIX")
> public class CSVLineFormatAED extends BindyCsvDataFormat {
> public CSVLineFormatAED() {
> super("com.myapp....package");
> }
> }
>
> public class BindyRoute extends RouteBuilder {
>
> @Override
> public void configure() throws Exception {
>
> // Context Camel
> SpringCamelContext camelCtx = (SpringCamelContext)
> getContext();
>
> // Context Spring
> ApplicationContext springCtx =
> camelCtx.getApplicationContext();
>
> BindyCsvDataFormat camelDataFormatAED =
> (BindyCsvDataFormat) springCtx
> .getBean("cSVLineFormatAED");
>
> from("file:C:/input/test.csv")
> .split(body().tokenize("\n"))
> .unmarshal(camelDataFormatAED)
> .to("mock:test").end();
> ...
> }
>
> Hope it will be helpfull for other developper !
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/A-little-problem-with-annotation-CsvRecord-tp5728109p5728119.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>