提交 05d1e5c3 authored 作者: wyl's avatar wyl

rule少一个字段“备注”,补全

上级 5da82d08
...@@ -69,12 +69,13 @@ public class WebSocketServer { ...@@ -69,12 +69,13 @@ public class WebSocketServer {
this.session.getBasicRemote().sendText(message); this.session.getBasicRemote().sendText(message);
} }
public static void sendIn(String sessionId,String message) throws IOException { public static void sendIn(String sessionId,String message) throws IOException {
try { System.out.println(message);
map.get(sessionId).sendMessage(message); // try {
}catch (Exception e){ // map.get(sessionId).sendMessage(message);
log.info("向前台发送日志出错"); // }catch (Exception e){
//e.printStackTrace(); // log.info("向前台发送日志出错");
} // //e.printStackTrace();
// }
} }
} }
...@@ -119,7 +119,7 @@ public class Adaptor { ...@@ -119,7 +119,7 @@ public class Adaptor {
//Files.copy(file,originalPath); //Files.copy(file,originalPath);
Files.move(file, originalPath); Files.move(file, originalPath);
//splitedFile.setDeal(true); //splitedFile.setDeal(true);
WebSocketServer.sendIn(uuid,TimeUtil.getNowDate()+"内容替换:过滤文件"+project.getProjectName()); WebSocketServer.sendIn(uuid,TimeUtil.getNowDate()+"内容替换:过滤文件"+project.getProjectName()+file.getFileName());
//System.out.println(); //System.out.println();
if (attrs.size() > LIMIT) { if (attrs.size() > LIMIT) {
System.out.println("找到大文件" + file); System.out.println("找到大文件" + file);
...@@ -174,9 +174,9 @@ public class Adaptor { ...@@ -174,9 +174,9 @@ public class Adaptor {
} }
//originalFileDao.saveAll(originalFiles); //originalFileDao.saveAll(originalFiles);
//adaptationDetailLogEntityDao.saveAll(detailsLogEntities); //adaptationDetailLogEntityDao.saveAll(detailsLogEntities);
// Project one = projectDao.getOne(project.getId()); Project one = projectDao.getOne(project.getId());
// one.setStage(1); one.setStage(1);
Project one = new Project(); //Project one = new Project();
return ServerResponse.success("替换成功",one); return ServerResponse.success("替换成功",one);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
......
package com.zjty.adaptationmaster;
import com.zjty.adaptationmaster.adaptor.entity.Project;
import com.zjty.adaptationmaster.adaptor.entity.Rule;
import com.zjty.adaptationmaster.utils.Adaptor;
import java.util.ArrayList;
import java.util.List;
public class TestDemo {
public static void main(String[] args) {
Rule rule = new Rule();
rule.setPath("*.*");
rule.setTarget("OpenDoc\\(\\);");
rule.setReplacing("OpenOfd\\(\\);");
List ruleList = new ArrayList();
ruleList.add(rule);
Project project = new Project();
project.setCodeUrl("C:\\Users\\wyl\\Desktop\\demo");
project.setProjectName("aaa");
Adaptor adaptor = new Adaptor();
adaptor.setRuleList(ruleList);
adaptor.setProject(project);
adaptor.doAdapt();
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论