mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
fix(接口测试): 加载证书时没有关闭输入流
This commit is contained in:
parent
04abe38601
commit
ae9a453ba7
@ -155,9 +155,9 @@ public abstract class SSLManager {
|
||||
if (StringUtils.isNotBlank(resourceId) && keyMap.containsKey(resourceId)) {
|
||||
KeystoreDTO dto = keyMap.get(resourceId);
|
||||
// 加载认证文件
|
||||
InputStream in = new FileInputStream(new File(dto.getPath()));
|
||||
this.keyStore.load(in, dto.getPwd());
|
||||
|
||||
try (InputStream in = new FileInputStream(new File(dto.getPath()))) {
|
||||
this.keyStore.load(in, dto.getPwd());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user