I am little bit confused on the usage of FormatterLineAggregator.

In Spring Batch 1.x I used to use FixedLengthLineAggregator to format and output my header/content/footer, that worked just fine.

I do not see that class in 2.x and after much research found that it is replaced by FormatterLineAggregator. Well I am confused on the usage of this.

I did

It is printing out

1s[1, REPORT]

While I would expect the output to be:

1 REPORT

with no 1s and square brackets and the commas.

I am sure there is a trick to do this, can someone help? Also how do I provide ranges using this?? like: 1, 4-6, 10-34

I used to have this in FixedLengthLineAggregator and I am not sure how to do that in 2.x Any help is greatly appreciated.

Thanks!

In Spring Batch 1.x I used to use FixedLengthLineAggregator to format and output my header/content/footer, that worked just fine.

I do not see that class in 2.x and after much research found that it is replaced by FormatterLineAggregator. Well I am confused on the usage of this.

I did

Code:

<beans:bean id="reportHeaderLine1" class="org.springframework.batch.item.file.transform.FormatterLineAggregator" p:format="1s%-6s" />

1s[1, REPORT]

While I would expect the output to be:

1 REPORT

with no 1s and square brackets and the commas.

I am sure there is a trick to do this, can someone help? Also how do I provide ranges using this?? like: 1, 4-6, 10-34

I used to have this in FixedLengthLineAggregator and I am not sure how to do that in 2.x Any help is greatly appreciated.

Thanks!

## Comment