|
@@ -512,7 +512,7 @@ public class JmgaServiceImpl implements IJmgaService {
|
|
|
}
|
|
}
|
|
|
String targetPath = file.getAbsolutePath().replace(FileUtil.getParent(serverPath, 1) + File.separator, tmpPath);
|
|
String targetPath = file.getAbsolutePath().replace(FileUtil.getParent(serverPath, 1) + File.separator, tmpPath);
|
|
|
File targetLog = new File(targetPath);
|
|
File targetLog = new File(targetPath);
|
|
|
- targetLog.createNewFile();
|
|
|
|
|
|
|
+// targetLog.createNewFile();
|
|
|
try (Stream<String> lines = Files.lines(Paths.get(file.getAbsolutePath()), StandardCharsets.UTF_8)) {
|
|
try (Stream<String> lines = Files.lines(Paths.get(file.getAbsolutePath()), StandardCharsets.UTF_8)) {
|
|
|
lines.map(line -> line.replace("公安", "xx").replaceAll(ipv4Pattern, "ip"))
|
|
lines.map(line -> line.replace("公安", "xx").replaceAll(ipv4Pattern, "ip"))
|
|
|
.forEach(line -> FileUtil.appendUtf8String(line, targetLog)); // 或者进行其他处理
|
|
.forEach(line -> FileUtil.appendUtf8String(line, targetLog)); // 或者进行其他处理
|