初始化存储引擎后, 增加测试连接机制

This commit is contained in:
zhaojun1998
2019-12-25 21:57:22 +08:00
parent e334acd508
commit b65ccc95e2
10 changed files with 23 additions and 14 deletions

View File

@@ -68,13 +68,13 @@ public class MinIOServiceImpl implements FileService {
minioClient = new MinioClient(endPoint, accessKey, secretKey);
basePath = stringStorageConfigMap.get(BASE_PATH).getValue();
basePath = basePath == null ? "" : basePath;
isInitialized = true;
isInitialized = testConnection();
} catch (Exception e) {
log.debug(StorageTypeEnum.MINIO.getDescription() + "初始化异常, 已跳过");
}
}
@Cacheable
// @Cacheable
@Override
public List<FileItemDTO> fileList(String path) throws Exception {
path = StringUtils.removeFirstSeparator(path);