You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
FlatFileIteamReader skip any lines if the line starts with #
Example:
email
hello
#hello2 --> this will be skipped
hello3
hello4
Environment
Spring Batch 2.7.10
Java 17
H2 Mem / Postgres/SQL Server
Steps to reproduce
I have attached 2 files
import.txt
springdemo2.zip
compile and run the jar. The program will import the import.txt and print the data to the console. (it will skip line #2) .
Expected behavior
All the lines inside the file will be read.
Minimal Complete Reproducible example
springdemo2.zip and import.txt is attached
just compile into jar file and put the import.txt inside the target directory.
Running the jar file should skip the line with the #
as shown below:
2023-03-26 23:25:58.171 INFO 30528 --- [ main] o.s.batch.core.job.SimpleStepHandler : Executing step: [Import Exception Step]
Email: ExceptionUserEntity(email=hello)
Email: ExceptionUserEntity(email=hello3)
Email: ExceptionUserEntity(email=hello4)
--> Notice: hello2 is skipped
Bug reports that are repr springdemo2.zip
oducible will take priority in resolution over reports that are not reproducible. import.txt
The text was updated successfully, but these errors were encountered:
Hi @tirtawn, this is actually a feature as comments usually start with #.
If this doesn't work for you, you can use FlatFileItemReader#setComments to set different comment prefixes. To disable this feature completely, you can pass an empty array to that method.
Bug description
FlatFileIteamReader skip any lines if the line starts with #
Example:
email
hello
#hello2 --> this will be skipped
hello3
hello4
Environment
Spring Batch 2.7.10
Java 17
H2 Mem / Postgres/SQL Server
Steps to reproduce
I have attached 2 files
import.txt
springdemo2.zip
compile and run the jar. The program will import the import.txt and print the data to the console. (it will skip line #2) .
Expected behavior
All the lines inside the file will be read.
Minimal Complete Reproducible example
springdemo2.zip and import.txt is attached
just compile into jar file and put the import.txt inside the target directory.
Running the jar file should skip the line with the #
as shown below:
2023-03-26 23:25:58.171 INFO 30528 --- [ main] o.s.batch.core.job.SimpleStepHandler : Executing step: [Import Exception Step]
Email: ExceptionUserEntity(email=hello)
Email: ExceptionUserEntity(email=hello3)
Email: ExceptionUserEntity(email=hello4)
--> Notice: hello2 is skipped
Bug reports that are repr
springdemo2.zip
oducible will take priority in resolution over reports that are not reproducible.
import.txt
The text was updated successfully, but these errors were encountered: