Spring batch: Input resource does not exist class path resource

后端 未结 2 1557
轻奢々
轻奢々 2021-01-21 04:20

I am currently developing a Spring Batch which converts an Excel (.xsls) file to CSV in first step and then reads the CSV, processes it and stores its data in database. The firs

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-21 04:37

    Seeing :

    Caused by: java.lang.IllegalStateException: Input resource must exist (reader is in 'strict' mode): URL [file://work//referentielAgenceCE.csv]
    

    And more precisely :

    file://work//referentielAgenceCE.csv
    

    I think you need to replace :

    batch.referentielAgenceCE.inputFilePathXLSX=C\:\\work\\referentielAgenceCE.xlsx
    batch.referentielAgenceCE.inputFilePathCSV=C\:\\work\\referentielAgenceCE.csv
    

    by

    batch.referentielAgenceCE.inputFilePathXLSX=C:\\work\\referentielAgenceCE.xlsx
    batch.referentielAgenceCE.inputFilePathCSV=C:\\work\\referentielAgenceCE.csv
    

提交回复
热议问题