Skip to content

Commit 8667bb4

Browse files
committed
fix #13
1 parent d2fa334 commit 8667bb4

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

boot-dubbo/dubbo-consumer/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dubbo:
1717
#服务注册配置
1818
registry:
1919
id: zk-registry
20-
address: zookeeper://localhost:2181
20+
address: zookeeper://118.24.147.38:2181
2121
logging:
2222
level:
2323
org.boot.dubbo.consumer: debug

boot-dubbo/dubbo-provider/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dubbo:
1212
owner: LuoLiang
1313
registry:
1414
id: zk-registry
15-
address: zookeeper://localhost:2181
15+
address: zookeeper://118.24.147.38:2181
1616
protocol:
1717
id: dubbo
1818
name: dubbo

boot-uploader/boot-uploader/src/main/java/org/boot/uploader/util/FileUtils.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66

77
import java.io.IOException;
88
import java.nio.file.Files;
9+
import java.nio.file.Path;
910
import java.nio.file.Paths;
1011
import java.nio.file.StandardOpenOption;
12+
import java.util.stream.Stream;
1113

1214
/**
1315
* @author luoliang
@@ -44,8 +46,11 @@ public static String generatePath(String uploadFolder, Chunk chunk) {
4446
public static void merge(String targetFile, String folder, String filename) {
4547
try {
4648
Files.createFile(Paths.get(targetFile));
47-
Files.list(Paths.get(folder))
48-
.filter(path -> !path.getFileName().toString().equals(filename))
49+
} catch (IOException e) {
50+
log.error(e.getMessage(), e);
51+
}
52+
try (Stream<Path> stream = Files.list(Paths.get(folder))) {
53+
stream.filter(path -> !path.getFileName().toString().equals(filename))
4954
.sorted((o1, o2) -> {
5055
String p1 = o1.getFileName().toString();
5156
String p2 = o2.getFileName().toString();

0 commit comments

Comments
 (0)