2017-10-19 62 views
0

我面對錯誤文件找不到ItemReader可以」找到我的csv文件

Caused by: java.lang.IllegalStateException: Input resource must exist 
(reader is in 'strict' mode): class path resource 
[file:///C:/Users/hello/Desktop/input/Ref_Org_Entite.csv] 

這是我application.properties

ressource.path.InputDirectory=file:///C:/Users/hello/Desktop/input/ 

我即使只有file:C:/Users/hello/Desktop/input/file:/C:/Users/hello/Desktop/input/,而不是測試工作也

這裏是我的物品閱讀器

public class RefOrgEntitesItemReader extends FlatFileItemReader<xxxxxx> { 

     public RefOrgEntitesItemReader(String path) { 
      this.setLinesToSkip(1); 
      this.setResource(new ClassPathResource(path + "Ref_Org_Entite.csv")); 
      ... 

,甚至當我使用的資源集合與FileSystemResource instedof ClassPathResource一個得到同樣的錯誤 .setResource(new FileSystemResource(path + "test.csv"));

我窗10

回答

0
setResource(new FileSystemResource(path + "test.csv")) 

更新我的application.properties沒有文件下:

ressource.path.InputDirectory=C:/Users/hello/Desktop/input/ 
相關問題