Vicky Vicky - 4 months ago 14
Java Question

Spring batch - using multiple characters as delimiter

I have a input file with delimiter as "||".

As you can see there are two characters but batch accepts a single character as delimiter.

How to go about this issue??

Issue Batch-591 in Jira shows as resolved -- Is it possible to use multiple characters as delimiter ??

Thanks,
Nik

Answer

The referenced issue is resolved as wont-fix. This means they don't see the necessity of this issue.

But I guess you are recommended to implement your own Tokenizer class (probably extending AbstractLineTokenizer), using a workaround strategy like this one.