-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
porter公共数据源配置前缀修改及全局变量SimpleDateFormat线程安全问题
- Loading branch information
1 parent
9c2d2ce
commit 3c51d90
Showing
5 changed files
with
17 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ | |
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import java.util.stream.Stream; | ||
|
||
/** | ||
* @author: zhangkewei[[email protected]] | ||
|
@@ -79,8 +80,8 @@ public List<String> getChildren(String path) { | |
@Override | ||
public Pair<String, Boolean> getData(String path) { | ||
String content = null; | ||
try (Stream<String> stream = Files.lines(Paths.get(getRealPath(path)))){ | ||
content = stream.reduce((p, n) -> p + n).orElse(""); | ||
try (Stream<String> stream = Files.lines(Paths.get(getRealPath(path)))) { | ||
content = stream.reduce((p, n) -> p + n).orElse(""); | ||
} catch (IOException e) { | ||
LOGGER.warn("getData {} fail.", path, e); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
* @review: zhangkewei[[email protected]]/2017年12月19日 13:59 | ||
*/ | ||
|
||
@ConfigurationProperties(prefix = "node") | ||
@ConfigurationProperties(prefix = "porter") | ||
@Component | ||
public class SourcesConfig { | ||
private Map<String, Map<String, String>> source; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters