Skip to content

Commit

Permalink
Adapt S3 only
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejNedic committed Dec 18, 2024
1 parent fd0ad73 commit 0e9f9d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
import org.springframework.boot.BootstrapRegistry;
import org.springframework.boot.ConfigurableBootstrapContext;
import org.springframework.boot.context.config.ConfigDataLocation;
import org.springframework.boot.context.config.ConfigDataLocationNotFoundException;
import org.springframework.boot.context.config.ConfigDataLocationResolver;
import org.springframework.boot.context.config.ConfigDataLocationResolverContext;
import org.springframework.boot.context.config.ConfigDataResource;
import org.springframework.boot.context.config.ConfigDataResourceNotFoundException;
import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.context.ConfigurableApplicationContext;
Expand Down Expand Up @@ -60,6 +62,12 @@ public boolean isResolvable(ConfigDataLocationResolverContext context, ConfigDat
return location.hasPrefix(getPrefix());
}

@Override
public List<T> resolve(ConfigDataLocationResolverContext context, ConfigDataLocation location)
throws ConfigDataLocationNotFoundException, ConfigDataResourceNotFoundException {
return Collections.emptyList();
}

protected <C> void registerAndPromoteBean(ConfigDataLocationResolverContext context, Class<C> type,
BootstrapRegistry.InstanceSupplier<C> supplier) {
registerBean(context, type, supplier);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.springframework.boot.context.config.ConfigDataLocation;
import org.springframework.boot.context.config.ConfigDataLocationNotFoundException;
import org.springframework.boot.context.config.ConfigDataLocationResolverContext;
import org.springframework.boot.context.config.Profiles;
import org.springframework.boot.context.properties.bind.Bindable;
import org.springframework.boot.context.properties.bind.Binder;
import org.springframework.boot.logging.DeferredLogFactory;
Expand Down Expand Up @@ -59,8 +60,9 @@ protected String getPrefix() {
}

@Override
public List<ParameterStoreConfigDataResource> resolve(ConfigDataLocationResolverContext resolverContext,
ConfigDataLocation location) throws ConfigDataLocationNotFoundException {
public List<ParameterStoreConfigDataResource> resolveProfileSpecific(
ConfigDataLocationResolverContext resolverContext, ConfigDataLocation location, Profiles profiles)
throws ConfigDataLocationNotFoundException {
var properties = loadProperties(resolverContext.getBinder());
List<ParameterStoreConfigDataResource> locations = new ArrayList<>();
ParameterStorePropertySources sources = new ParameterStorePropertySources();
Expand Down

0 comments on commit 0e9f9d9

Please sign in to comment.