Skip to content

Commit

Permalink
Bump azure-spring-boot-bom from 3.14.0 to 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
srempfer committed May 10, 2022
1 parent 0c89cf0 commit 5bd9ebb
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spring.cloud.config.server.azure.keyvault.client-key=put-your-azure-client-key-h
spring.cloud.config.server.azure.keyvault.tenant-id=put-your-azure-tenant-id-here
```

For the interaction with Azure KeyVault the [Azure Key Vault Secrets Spring Boot Starter](https://github.com/Azure/azure-sdk-for-java/tree/azure-spring-boot-starter-keyvault-secrets_3.14.0/sdk/spring/azure-spring-boot-starter-keyvault-secrets)
For the interaction with Azure KeyVault the [Spring Cloud Azure Starter Keyvault Secrets](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/spring-cloud-azure-starter-keyvault-secrets)
is used.

### Usage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
server.port=8888

# required because health indicator could not be disabled in starter itself
# as alternative the auto-configuration 'com.azure.spring.keyvault.KeyVaultHealthConfiguration' could be excluded
management.health.azure-key-vault.enabled=false

# Hint: The auto-configuration 'com.azure.spring.keyvault.KeyVaultHealthConfiguration' also changes the response type
# for the HealthEndpoint => management.endpoint.health.show-details=always
server.port=8888
6 changes: 3 additions & 3 deletions spring-cloud-config-azure-keyvault-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>2021.0.2</spring-cloud.version>
<azure.spring-boot.version>3.14.0</azure.spring-boot.version>
<azure.spring-boot.version>4.1.0</azure.spring-boot.version>
</properties>

<dependencies>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-starter-keyvault-secrets</artifactId>
<artifactId>spring-cloud-azure-starter-keyvault-secrets</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
Expand All @@ -89,7 +89,7 @@
<dependencies>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-spring-boot-bom</artifactId>
<artifactId>spring-cloud-azure-dependencies</artifactId>
<version>${azure.spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.srempfer.cloud.config.keyvault;

import com.azure.spring.keyvault.KeyVaultOperation;
import com.azure.spring.cloud.autoconfigure.keyvault.environment.KeyVaultOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.config.environment.Environment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.srempfer.cloud.config.keyvault;

import com.azure.spring.keyvault.KeyVaultOperation;
import com.azure.spring.cloud.autoconfigure.keyvault.environment.KeyVaultOperation;
import org.springframework.cloud.config.environment.Environment;
import org.springframework.cloud.config.environment.PropertySource;
import org.springframework.cloud.config.server.environment.EnvironmentRepository;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.srempfer.cloud.config.keyvault;

import com.azure.spring.keyvault.KeyVaultOperation;
import com.azure.spring.cloud.autoconfigure.keyvault.environment.KeyVaultOperation;
import org.springframework.cloud.config.server.environment.EnvironmentRepositoryFactory;
import org.srempfer.cloud.config.keyvault.autoconfigure.KeyVaultEnvironmentProperties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.azure.identity.ManagedIdentityCredentialBuilder;
import com.azure.security.keyvault.secrets.SecretClient;
import com.azure.security.keyvault.secrets.SecretClientBuilder;
import com.azure.spring.keyvault.KeyVaultOperation;
import com.azure.spring.cloud.autoconfigure.keyvault.environment.KeyVaultOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.srempfer.cloud.config.keyvault.autoconfigure;

import com.azure.spring.keyvault.KeyVaultOperation;
import com.azure.spring.cloud.autoconfigure.keyvault.environment.KeyVaultOperation;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.srempfer.cloud.config.keyvault.autoconfigure;

import com.azure.spring.utils.Constants;
import com.azure.spring.cloud.autoconfigure.implementation.keyvault.secrets.properties.AzureKeyVaultPropertySourceProperties;

import java.time.Duration;

/**
* Properties for Azure KeyVault access.
Expand Down Expand Up @@ -47,9 +49,9 @@ public class KeyVaultProperties {
private String tenantId;

/**
* Interval in milli seconds how long the retrieved secrets are cached before lookup in Azure KeyVault again.
* Interval how long the retrieved secrets are cached before lookup in Azure KeyVault again.
*/
private Long refreshInterval = Constants.DEFAULT_REFRESH_INTERVAL_MS;
private Duration refreshInterval = AzureKeyVaultPropertySourceProperties.DEFAULT_REFRESH_INTERVAL;

/**
* Flag if telemetry of usage is sent to Microsoft.
Expand Down Expand Up @@ -107,11 +109,11 @@ public void setTenantId ( String tenantId ) {
this.tenantId = tenantId;
}

public Long getRefreshInterval () {
public Duration getRefreshInterval () {
return refreshInterval;
}

public void setRefreshInterval ( Long refreshInterval ) {
public void setRefreshInterval ( Duration refreshInterval ) {
this.refreshInterval = refreshInterval;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.srempfer.cloud.config.keyvault;

import com.azure.spring.keyvault.KeyVaultOperation;
import com.azure.spring.cloud.autoconfigure.keyvault.environment.KeyVaultOperation;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.cloud.config.environment.Environment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.srempfer.cloud.config.keyvault;

import com.azure.spring.keyvault.KeyVaultOperation;
import com.azure.spring.cloud.autoconfigure.keyvault.environment.KeyVaultOperation;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.cloud.config.environment.Environment;
Expand Down

0 comments on commit 5bd9ebb

Please sign in to comment.