diff --git a/pom.xml b/pom.xml index 61c7782..b78ceb2 100644 --- a/pom.xml +++ b/pom.xml @@ -80,7 +80,7 @@ io.minio minio - 7.1.4 + 8.5.5 net.logstash.logback diff --git a/src/main/java/no/uio/ifi/localega/doa/LocalEGADOAApplication.java b/src/main/java/no/uio/ifi/localega/doa/LocalEGADOAApplication.java index 035ab83..cb4a130 100644 --- a/src/main/java/no/uio/ifi/localega/doa/LocalEGADOAApplication.java +++ b/src/main/java/no/uio/ifi/localega/doa/LocalEGADOAApplication.java @@ -1,7 +1,6 @@ package no.uio.ifi.localega.doa; import io.minio.MinioClient; -import io.minio.errors.*; import lombok.extern.slf4j.Slf4j; import okhttp3.OkHttpClient; import org.apache.commons.lang3.StringUtils; @@ -63,12 +62,12 @@ public static void main(String[] args) { */ @Bean public MinioClient archiveClient(@Value("${s3.endpoint}") String s3Endpoint, - @Value("${s3.port}") int s3Port, - @Value("${s3.access-key}") String s3AccessKey, - @Value("${s3.secret-key}") String s3SecretKey, - @Value("${s3.region}") String s3Region, - @Value("${s3.secure}") boolean s3Secure, - @Value("${s3.root-ca}") String s3RootCA) throws GeneralSecurityException, ServerException, InsufficientDataException, InternalException, IOException, InvalidResponseException, InvalidBucketNameException, XmlParserException, ErrorResponseException, RegionConflictException { + @Value("${s3.port}") int s3Port, + @Value("${s3.access-key}") String s3AccessKey, + @Value("${s3.secret-key}") String s3SecretKey, + @Value("${s3.region}") String s3Region, + @Value("${s3.secure}") boolean s3Secure, + @Value("${s3.root-ca}") String s3RootCA) throws GeneralSecurityException { MinioClient.Builder builder = MinioClient.builder().endpoint(s3Endpoint, s3Port, s3Secure).region(s3Region).credentials(s3AccessKey, s3SecretKey); Optional optionalOkHttpClient = buildOkHttpClient(s3RootCA); optionalOkHttpClient.ifPresent(builder::httpClient); @@ -88,7 +87,7 @@ public MinioClient outboxClient(@Value("${s3.out.endpoint}") String s3Endpoint, @Value("${s3.out.secret-key}") String s3SecretKey, @Value("${s3.out.region}") String s3Region, @Value("${s3.out.secure}") boolean s3Secure, - @Value("${s3.out.root-ca}") String s3RootCA) throws GeneralSecurityException, ServerException, InsufficientDataException, InternalException, IOException, InvalidResponseException, InvalidBucketNameException, XmlParserException, ErrorResponseException, RegionConflictException { + @Value("${s3.out.root-ca}") String s3RootCA) throws GeneralSecurityException { MinioClient.Builder builder = MinioClient.builder().endpoint(s3Endpoint, s3Port, s3Secure).region(s3Region).credentials(s3AccessKey, s3SecretKey); Optional optionalOkHttpClient = buildOkHttpClient(s3RootCA); optionalOkHttpClient.ifPresent(builder::httpClient); diff --git a/src/main/java/no/uio/ifi/localega/doa/services/StreamingService.java b/src/main/java/no/uio/ifi/localega/doa/services/StreamingService.java index 179ef8e..edb379a 100644 --- a/src/main/java/no/uio/ifi/localega/doa/services/StreamingService.java +++ b/src/main/java/no/uio/ifi/localega/doa/services/StreamingService.java @@ -118,7 +118,7 @@ private InputStream getEncryptedResponse(byte[] header, InputStream bodyInputStr return new SequenceInputStream(headerInputStream, bodyInputStream); } - private InputStream getFileInputStream(LEGAFile file) throws IOException, InvalidKeyException, NoSuchAlgorithmException, InsufficientDataException, InvalidResponseException, InternalException, InvalidBucketNameException, ErrorResponseException, ServerException, XmlParserException { + private InputStream getFileInputStream(LEGAFile file) throws IOException, InvalidKeyException, NoSuchAlgorithmException, InsufficientDataException, InvalidResponseException, InternalException, ErrorResponseException, ServerException, XmlParserException { String filePath = file.getFilePath(); try { // S3 BigInteger s3FileId = new BigInteger(filePath);