|
@@ -43,9 +43,9 @@ public class SurromdaoFileListener extends FileAlterationListenerAdaptor {
|
|
|
// 逐行读取,直到文件末尾
|
|
|
while ((line = br.readLine()) != null) {
|
|
|
if(i ==0){
|
|
|
+ line1=line1.trim().replaceAll("\\s+"," ");//替换多个空格为一个空格
|
|
|
line1=line.replace(" / ","/");
|
|
|
line1=line.replace("阻力系数Cdconstraint","阻力系数Cd constraint");
|
|
|
- line1=line1.trim().replaceAll("\\s+"," ");//替换多个空格为一个空格
|
|
|
// 处理每一行数据
|
|
|
System.out.println(line);
|
|
|
}
|
|
@@ -61,6 +61,7 @@ public class SurromdaoFileListener extends FileAlterationListenerAdaptor {
|
|
|
|
|
|
WebsocketEndPoint webs = (WebsocketEndPoint) UtilTools.getBean("websocketEndPoint");
|
|
|
Gson gson = new Gson();
|
|
|
+ System.out.println(gson.toJson(comval));
|
|
|
webs.sendMessageToUser(String.valueOf(pid),gson.toJson(comval));
|
|
|
|
|
|
}
|