|
@@ -263,39 +263,5 @@ public class AircraftParameterManagementController extends BaseController
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @GetMapping(value = "/getfilecontent")
|
|
|
- public int getfilecontent(@RequestParam("filepath") String filepath)
|
|
|
- {
|
|
|
- System.out.println(filepath);
|
|
|
- try
|
|
|
- {
|
|
|
- List< List<String> > data = new ArrayList<>();//list of lists to store data
|
|
|
-// String file = "C:\\kgraph\\uploadPath\\upload\\2024\\01\\18\\number_20240118161245A001.csv";//file path
|
|
|
- FileReader fr = new FileReader(filepath);
|
|
|
- BufferedReader br = new BufferedReader(fr);
|
|
|
-
|
|
|
- //Reading until we run out of lines
|
|
|
- String line = br.readLine();
|
|
|
- while(line != null)
|
|
|
- {
|
|
|
- List<String> lineData = Arrays.asList(line.split(","));//splitting lines
|
|
|
- data.add(lineData);
|
|
|
- line = br.readLine();
|
|
|
- }
|
|
|
|
|
|
- //printing the fetched data
|
|
|
- for(List<String> list : data)
|
|
|
- {
|
|
|
- for(String str : list)
|
|
|
- System.out.print(str + " ");
|
|
|
- System.out.println();
|
|
|
- }
|
|
|
- br.close();
|
|
|
- }
|
|
|
- catch(Exception e)
|
|
|
- {
|
|
|
- System.out.print(e);
|
|
|
- }
|
|
|
- return 1;
|
|
|
- }
|
|
|
}
|