Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare app config release #26311

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 2.3.0 (2021-12-24)
## 2.3.0 (2022-01-06)
This release is compatible with Spring Boot 2.5.5-2.5.8, 2.6.0-2.6.1.

## 2.2.0 (2021-11-25)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 2.3.0 (2021-12-24)
## 2.3.0 (2022-01-06)
This release is compatible with Spring Boot 2.5.5-2.5.8, 2.6.0-2.6.1.

### Bugs Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import java.util.List;

import javax.annotation.PostConstruct;
import javax.validation.constraints.NotEmpty;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.Import;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
Expand All @@ -34,10 +36,21 @@ public final class AppConfigurationProperties {
*/
public static final String LABEL_SEPARATOR = ",";

/**
* Context for loading configuration keys.
*/
@NotEmpty
private String defaultContext = "application";

private boolean enabled = true;

private List<ConfigStore> stores = new ArrayList<>();

/**
* Alternative to Spring application name, if not configured, fallback to default Spring application name
**/
private String name;

@NestedConfigurationProperty
private AppConfigManagedIdentityProperties managedIdentity;

Expand Down Expand Up @@ -71,6 +84,47 @@ public void setStores(List<ConfigStore> stores) {
this.stores = stores;
}

/**
* The prefixed used before all keys loaded.
* @deprecated Use spring.cloud.azure.appconfiguration[0].selects
* @return null
*/
@Deprecated
public String getDefaultContext() {
return defaultContext;
}

/**
* Overrides the default context of `applicaiton`.
* @deprecated Use spring.cloud.azure.appconfiguration[0].selects
* @param defaultContext Key Prefix.
*/
@Deprecated
public void setDefaultContext(String defaultContext) {
this.defaultContext = defaultContext;
}

/**
* Used to override the spring.application.name value
* @deprecated Use spring.cloud.azure.appconfiguration[0].selects
* @return name
*/
@Deprecated
@Nullable
public String getName() {
return name;
}

/**
* Used to override the spring.application.name value
* @deprecated Use spring.cloud.azure.appconfiguration[0].selects
* @param name application name in conifg key.
*/
@Deprecated
public void setName(@Nullable String name) {
this.name = name;
}

/**
* @return the managedIdentity
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void expireState() {

@Test
public void notExpireState() {
String endpoint = "testEndpoint";
String endpoint = "notTestEndpoint";
List<ConfigurationSetting> watchKeys = new ArrayList<ConfigurationSetting>();

AppConfigurationStoreMonitoring monitoring = new AppConfigurationStoreMonitoring();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 2.2.0 (2021-12-24)
## 2.2.0 (2022-01-06)
This release is compatible with Spring Boot 2.5.5-2.5.8, 2.6.0-2.6.1.

## 2.1.0 (2021-11-25)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 2.2.0 (2021-12-24)
## 2.2.0 (2022-01-06)
This release is compatible with Spring Boot 2.5.5-2.5.8, 2.6.0-2.6.1.

## 2.1.0 (2021-11-25)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 2.3.0 (2021-12-24)
## 2.3.0 (2022-01-06)
This release is compatible with Spring Boot 2.5.5-2.5.8, 2.6.0-2.6.1.

## 2.2.0 (2021-11-25)
Expand Down