Skip to content

Commit

Permalink
Fixing compile and dependencies for Boot 3.4.x
Browse files Browse the repository at this point in the history
Fixes #733
  • Loading branch information
ryanjbaxter committed Aug 7, 2024
1 parent bb8741c commit b875938
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.springframework.cloud.vault.config.consul;

import java.util.Base64;
import java.util.Collections;
import java.util.Map;

Expand All @@ -28,7 +29,6 @@
import org.springframework.cloud.vault.config.consul.VaultConfigConsulBootstrapConfiguration.ConsulSecretBackendMetadataFactory;
import org.springframework.cloud.vault.util.IntegrationTestSupport;
import org.springframework.cloud.vault.util.Settings;
import org.springframework.util.Base64Utils;
import org.springframework.vault.core.VaultOperations;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -70,7 +70,7 @@ public void setUp() {
SetupConsul.setupConsul(vaultOperations, this.consul.getBackend());

vaultOperations.write(String.format("%s/roles/%s", this.consul.getBackend(), this.consul.getRole()),
Collections.singletonMap("policy", Base64Utils.encodeToString(POLICY.getBytes())));
Collections.singletonMap("policy", Base64.getEncoder().encodeToString(POLICY.getBytes())));

this.configOperations = new VaultConfigTemplate(vaultOperations, this.vaultProperties);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.springframework.cloud.vault.config.consul;

import java.util.Base64;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
Expand All @@ -34,7 +35,6 @@
import org.springframework.cloud.vault.util.Settings;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.event.EventListener;
import org.springframework.util.Base64Utils;
import org.springframework.vault.core.VaultOperations;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -65,7 +65,7 @@ public void before() {
SetupConsul.setupConsul(vaultOperations, "consul");

Map<String, Object> role = new LinkedHashMap<>();
role.put("policy", Base64Utils.encodeToString(POLICY.getBytes()));
role.put("policy", Base64.getEncoder().encodeToString(POLICY.getBytes()));
role.put("ttl", "3s");
role.put("max_ttl", "3s");
vaultOperations.write(String.format("%s/roles/%s", "consul", "short-readonly"), role);
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-vault-config-databases/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</dependency>

<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
<scope>test</scope>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-vault-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<description>Spring Cloud Vault Dependencies</description>

<properties>
<spring-vault.version>3.1.1</spring-vault.version>
<spring-vault.version>3.1.2-SNAPSHOT</spring-vault.version>
</properties>

<dependencyManagement>
Expand Down

0 comments on commit b875938

Please sign in to comment.