提交 e3f9111f 编写于 作者: sinat_25235033's avatar sinat_25235033

fix too much read sureness.yml times when auth may make system down

上级 6fb47c7c
......@@ -30,6 +30,9 @@ public class DocumentResourceDefaultProvider implements PathTreeProvider, Surene
private static final String ROLE = "role";
/** sureness配置信息内存缓存 **/
private DocumentResourceEntity entity;
@Override
public Set<String> providePathData() {
try {
......@@ -67,7 +70,9 @@ public class DocumentResourceDefaultProvider implements PathTreeProvider, Surene
return null;
}
try {
DocumentResourceEntity entity = DocumentResourceAccess.loadConfig();
if (entity == null) {
entity = DocumentResourceAccess.loadConfig();
}
Optional<Map<String, Object>> mapOptional = entity.getAccount().stream()
.filter(map -> appId.equals(map.get("appId")))
.findFirst();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册