|
|
|
@ -111,11 +111,29 @@ public class DynamicMinioAttachmentService {
|
|
|
|
GetObjectArgs.builder().bucket(bucketName).object(objectName).build()
|
|
|
|
GetObjectArgs.builder().bucket(bucketName).object(objectName).build()
|
|
|
|
)) {
|
|
|
|
)) {
|
|
|
|
return is.readAllBytes();
|
|
|
|
return is.readAllBytes();
|
|
|
|
|
|
|
|
} catch (io.minio.errors.ErrorResponseException e) {
|
|
|
|
|
|
|
|
// statusCode() 제거, 필요한 정보만 출력
|
|
|
|
|
|
|
|
throw new RuntimeException(
|
|
|
|
|
|
|
|
"MinIO 서버가 요청을 거부했습니다: " + objectName +
|
|
|
|
|
|
|
|
", 코드=" + e.errorResponse().code() +
|
|
|
|
|
|
|
|
", 메시지=" + e.errorResponse().message() +
|
|
|
|
|
|
|
|
", 요청ID=" + e.errorResponse().requestId() +
|
|
|
|
|
|
|
|
", 호스트ID=" + e.errorResponse().hostId(), e);
|
|
|
|
|
|
|
|
} catch (io.minio.errors.ServerException e) {
|
|
|
|
|
|
|
|
throw new RuntimeException("MinIO 서버 오류 발생: " + objectName, e);
|
|
|
|
|
|
|
|
} catch (io.minio.errors.InsufficientDataException e) {
|
|
|
|
|
|
|
|
throw new RuntimeException("MinIO 데이터 부족 오류: " + objectName, e);
|
|
|
|
|
|
|
|
} catch (io.minio.errors.InternalException e) {
|
|
|
|
|
|
|
|
throw new RuntimeException("MinIO 내부 오류: " + objectName, e);
|
|
|
|
|
|
|
|
} catch (io.minio.errors.InvalidResponseException e) {
|
|
|
|
|
|
|
|
throw new RuntimeException("MinIO 응답 파싱 실패: " + objectName, e);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
throw new RuntimeException("MinIO 파일 다운로드 실패: " + objectName, e);
|
|
|
|
throw new RuntimeException("MinIO 파일 다운로드 실패: " + objectName, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** YAML 텍스트 읽기 */
|
|
|
|
/** YAML 텍스트 읽기 */
|
|
|
|
public String readYamlText(String objectName, String type) {
|
|
|
|
public String readYamlText(String objectName, String type) {
|
|
|
|
MinioClient client = getClientByType(type);
|
|
|
|
MinioClient client = getClientByType(type);
|
|
|
|
|