Skip to content

Commit

Permalink
Fjernet noen null-relaterte warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc3092 committed Apr 12, 2024
1 parent 2a4e427 commit 29ace95
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.lang.NonNull;
import org.springframework.vault.annotation.VaultPropertySource;
import org.springframework.vault.authentication.ClientAuthentication;
import org.springframework.vault.authentication.TokenAuthentication;
Expand All @@ -15,14 +16,16 @@
@VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false)
public class DevConfig extends AbstractVaultConfiguration {

private static final String VAULT_TOKEN = "spring.cloud.vault.token";
private static final String VAULT_TOKEN = "spring.cloud.vault.token";

@Override
@NonNull
public VaultEndpoint vaultEndpoint() {
return VaultEndpoint.create("vault.adeo.no", 443);
}

@Override
@NonNull
public ClientAuthentication clientAuthentication() {
if (System.getenv().containsKey("VAULT_TOKEN")) {
System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.lang.NonNull;
import org.springframework.vault.annotation.VaultPropertySource;
import org.springframework.vault.authentication.ClientAuthentication;
import org.springframework.vault.authentication.TokenAuthentication;
Expand All @@ -18,11 +19,13 @@ public class LocalVaultConfig extends AbstractVaultConfiguration {
private static final String VAULT_TOKEN = "spring.cloud.vault.token";

@Override
@NonNull
public VaultEndpoint vaultEndpoint() {
return VaultEndpoint.create("vault.adeo.no", 443);
}

@Override
@NonNull
public ClientAuthentication clientAuthentication() {
if (System.getenv().containsKey("VAULT_TOKEN")) {
System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.lang.NonNull;
import org.springframework.vault.annotation.VaultPropertySource;
import org.springframework.vault.authentication.ClientAuthentication;
import org.springframework.vault.authentication.TokenAuthentication;
Expand All @@ -18,11 +19,13 @@ public class DevConfig extends AbstractVaultConfiguration {
private static final String VAULT_TOKEN = "spring.cloud.vault.token";

@Override
@NonNull
public VaultEndpoint vaultEndpoint() {
return VaultEndpoint.create("vault.adeo.no", 443);
}

@Override
@NonNull
public ClientAuthentication clientAuthentication() {
if (System.getenv().containsKey("VAULT_TOKEN")) {
System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.lang.NonNull;
import org.springframework.vault.annotation.VaultPropertySource;
import org.springframework.vault.authentication.ClientAuthentication;
import org.springframework.vault.authentication.TokenAuthentication;
Expand All @@ -18,11 +19,13 @@ public class DevConfig extends AbstractVaultConfiguration {
private static final String VAULT_TOKEN = "spring.cloud.vault.token";

@Override
@NonNull
public VaultEndpoint vaultEndpoint() {
return VaultEndpoint.create("vault.adeo.no", 443);
}

@Override
@NonNull
public ClientAuthentication clientAuthentication() {
if (System.getenv().containsKey("VAULT_TOKEN")) {
System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN"));
Expand Down

0 comments on commit 29ace95

Please sign in to comment.