Skip to content

Commit

Permalink
Upgrading to the latest BQModuleProvider format
Browse files Browse the repository at this point in the history
  • Loading branch information
andrus committed Nov 24, 2023
1 parent b893597 commit 5d12f81
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
package io.bootique.aws.s3;

import io.bootique.BQModuleProvider;
import io.bootique.di.BQModule;
import io.bootique.bootstrap.BuiltModule;

public class AwsS3ModuleProvider implements BQModuleProvider {

@Override
public BQModule module() {
return new AwsS3Module();
public BuiltModule buildModule() {
return BuiltModule.of(new AwsS3Module())
.provider(this)
.description("Provides integration with AWS S3 client v1.")
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,19 @@
package io.bootique.aws.secrets;

import io.bootique.BQModuleProvider;
import io.bootique.di.BQModule;

import java.lang.reflect.Type;
import java.util.Collections;
import java.util.Map;
import io.bootique.bootstrap.BuiltModule;

/**
* @since 2.0.B1
*/
public class AwsSecretsModuleProvider implements BQModuleProvider {

@Override
public BQModule module() {
return new AwsSecretsModule();
}

@Override
public Map<String, Type> configs() {
return Collections.singletonMap("awssecrets", AwsSecretsFactory.class);
public BuiltModule buildModule() {
return BuiltModule.of(new AwsSecretsModule())
.provider(this)
.description("Provides integration with AWS Secrets client v1.")
.config("awssecrets", AwsSecretsFactory.class)
.build();
}
}
19 changes: 7 additions & 12 deletions bootique-aws/src/main/java/io/bootique/aws/AwsModuleProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,16 @@


import io.bootique.BQModuleProvider;
import io.bootique.di.BQModule;

import java.lang.reflect.Type;
import java.util.Collections;
import java.util.Map;
import io.bootique.bootstrap.BuiltModule;

public class AwsModuleProvider implements BQModuleProvider {

@Override
public BQModule module() {
return new AwsModule();
}

@Override
public Map<String, Type> configs() {
return Collections.singletonMap("aws", AwsConfigFactory.class);
public BuiltModule buildModule() {
return BuiltModule.of(new AwsModule())
.provider(this)
.description("Provides integration with AWS client v1.")
.config("aws", AwsConfigFactory.class)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
package io.bootique.aws2.s3;

import io.bootique.BQModuleProvider;
import io.bootique.di.BQModule;
import io.bootique.bootstrap.BuiltModule;

public class AwsS3ModuleProvider implements BQModuleProvider {

@Override
public BQModule module() {
return new AwsS3Module();
public BuiltModule buildModule() {
return BuiltModule.of(new AwsS3Module())
.provider(this)
.description("Provides integration with AWS S3 client v2.")
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,19 @@
package io.bootique.aws2.secrets;

import io.bootique.BQModuleProvider;
import io.bootique.di.BQModule;

import java.lang.reflect.Type;
import java.util.Collections;
import java.util.Map;
import io.bootique.bootstrap.BuiltModule;

/**
* @since 3.0
*/
public class AwsSecretsModuleProvider implements BQModuleProvider {

@Override
public BQModule module() {
return new AwsSecretsModule();
}

@Override
public Map<String, Type> configs() {
return Collections.singletonMap("awssecrets", AwsSecretsFactory.class);
public BuiltModule buildModule() {
return BuiltModule.of(new AwsSecretsModule())
.provider(this)
.description("Provides integration with AWS Secrets client v2.")
.config("awssecrets", AwsSecretsFactory.class)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,16 @@


import io.bootique.BQModuleProvider;
import io.bootique.di.BQModule;

import java.lang.reflect.Type;
import java.util.Collections;
import java.util.Map;
import io.bootique.bootstrap.BuiltModule;

public class AwsModuleProvider implements BQModuleProvider {

@Override
public BQModule module() {
return new AwsModule();
}

@Override
public Map<String, Type> configs() {
return Collections.singletonMap("aws", AwsConfigFactory.class);
public BuiltModule buildModule() {
return BuiltModule.of(new AwsModule())
.provider(this)
.description("Provides integration with AWS client v2.")
.config("aws", AwsConfigFactory.class)
.build();
}
}

0 comments on commit 5d12f81

Please sign in to comment.