Skip to content

Commit

Permalink
Revert "Fix the order of importing properties in Secrets Manager inte…
Browse files Browse the repository at this point in the history
…gration (#882)"

This reverts commit 294f91b
  • Loading branch information
maciejwalkowiak committed Dec 10, 2023
1 parent a8c1fad commit 5be3f14
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
import java.util.List;
import org.apache.commons.logging.Log;
import org.springframework.boot.BootstrapContext;
import org.springframework.boot.context.config.*;
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,9 +62,9 @@ protected String getPrefix() {
}

@Override
public List<SecretsManagerConfigDataResource> resolve(ConfigDataLocationResolverContext resolverContext,
ConfigDataLocation location)
throws ConfigDataLocationNotFoundException, ConfigDataResourceNotFoundException {
public List<SecretsManagerConfigDataResource> resolveProfileSpecific(
ConfigDataLocationResolverContext resolverContext, ConfigDataLocation location, Profiles profiles)
throws ConfigDataLocationNotFoundException {
registerBean(resolverContext, AwsProperties.class, loadAwsProperties(resolverContext.getBinder()));
registerBean(resolverContext, SecretsManagerProperties.class, loadProperties(resolverContext.getBinder()));
registerBean(resolverContext, CredentialsProperties.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,6 @@ void resolvesPropertyFromSecretsManager_PlainTextSecret_WithoutSlashes() {
}
}

@Test
void respectsImportOrder() {
SpringApplication application = new SpringApplication(App.class);
application.setWebApplicationType(WebApplicationType.NONE);

try (ConfigurableApplicationContext context = runApplication(application, "classpath:config.properties")) {
assertThat(context.getEnvironment().getProperty("another-parameter")).isEqualTo("from properties file");
}
}

@Test
void clientIsConfiguredWithConfigurerProvidedToBootstrapRegistry() {
SpringApplication application = new SpringApplication(App.class);
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 5be3f14

Please sign in to comment.