diff --git a/java/revenj-storage/pom.xml b/java/revenj-storage/pom.xml index 1fdd3d65..dd53870f 100644 --- a/java/revenj-storage/pom.xml +++ b/java/revenj-storage/pom.xml @@ -9,7 +9,7 @@ DSL Platform compatible backend - S3 integration (https://dsl-platform.com) https://github.com/ngs-doo/revenj jar - 0.9.0 + 0.9.1 diff --git a/java/revenj-storage/src/main/java/org/revenj/Storage.java b/java/revenj-storage/src/main/java/org/revenj/Storage.java index 27de05c5..d257fae4 100644 --- a/java/revenj-storage/src/main/java/org/revenj/Storage.java +++ b/java/revenj-storage/src/main/java/org/revenj/Storage.java @@ -8,8 +8,13 @@ import java.util.concurrent.ExecutorService; public abstract class Storage { - public void configure(Container container, Optional executorService) { + public static void configure(Container container) { Properties properties = container.resolve(Properties.class); + Optional executorService = container.tryResolve(ExecutorService.class); + configure(container, properties, executorService); + } + + public static void configure(Container container, Properties properties, Optional executorService) { container.registerInstance(S3Repository.class, new AmazonS3Repository(properties, executorService), true); } }