Skip to content

Commit

Permalink
Prepare app config release (#26311)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiliuTo authored Jan 6, 2022
1 parent b28642b commit eda0f00
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 6 deletions.
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

0 comments on commit eda0f00

Please sign in to comment.