Package io.awspring.cloud.appconfig
Class AppConfigPropertySource
java.lang.Object
org.springframework.core.env.PropertySource<T>
org.springframework.core.env.EnumerablePropertySource<T>
io.awspring.cloud.core.config.AwsPropertySource<AppConfigPropertySource,software.amazon.awssdk.services.appconfigdata.AppConfigDataClient>
io.awspring.cloud.appconfig.AppConfigPropertySource
public class AppConfigPropertySource
extends AwsPropertySource<AppConfigPropertySource,software.amazon.awssdk.services.appconfigdata.AppConfigDataClient>
Retrieves configuration property sources path from the AWS AppConfig using the provided
AppConfigDataClient.- Since:
- 4.1.0
- Author:
- Matej Nedic
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.core.env.PropertySource
PropertySource.StubPropertySource -
Field Summary
Fields inherited from class org.springframework.core.env.PropertySource
logger, name, source -
Constructor Summary
ConstructorsConstructorDescriptionAppConfigPropertySource(RequestContext context, software.amazon.awssdk.services.appconfigdata.AppConfigDataClient appConfigClient) AppConfigPropertySource(RequestContext context, software.amazon.awssdk.services.appconfigdata.AppConfigDataClient appConfigClient, @Nullable String sessionToken, Map<String, Object> properties) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a non-initialized copy of the property source.@Nullable ObjectgetProperty(String name) String[]voidinit()Initializes & fetches properties.voidrefresh(AwsPropertySource<?, ?> clone) Takes over state from a clone created byAwsPropertySource.copy()and initialized by the change detector on every execution cycle.Methods inherited from class org.springframework.core.env.EnumerablePropertySource
containsProperty
-
Constructor Details
-
AppConfigPropertySource
public AppConfigPropertySource(RequestContext context, software.amazon.awssdk.services.appconfigdata.AppConfigDataClient appConfigClient) -
AppConfigPropertySource
public AppConfigPropertySource(RequestContext context, software.amazon.awssdk.services.appconfigdata.AppConfigDataClient appConfigClient, @Nullable String sessionToken, Map<String, Object> properties)
-
-
Method Details
-
init
public void init()Description copied from class:AwsPropertySourceInitializes & fetches properties.- Specified by:
initin classAwsPropertySource<AppConfigPropertySource,software.amazon.awssdk.services.appconfigdata.AppConfigDataClient>
-
refresh
Description copied from class:AwsPropertySourceTakes over state from a clone created byAwsPropertySource.copy()and initialized by the change detector on every execution cycle. Implementations holding state that must survive across cycles, such as a session token, should override this method.- Overrides:
refreshin classAwsPropertySource<AppConfigPropertySource,software.amazon.awssdk.services.appconfigdata.AppConfigDataClient> - Parameters:
clone- an initialized copy of this property source
-
copy
Description copied from class:AwsPropertySourceCreates a non-initialized copy of the property source.- Specified by:
copyin classAwsPropertySource<AppConfigPropertySource,software.amazon.awssdk.services.appconfigdata.AppConfigDataClient> - Returns:
- a property source
-
getPropertyNames
- Specified by:
getPropertyNamesin classEnumerablePropertySource<software.amazon.awssdk.services.appconfigdata.AppConfigDataClient>
-
getProperty
- Specified by:
getPropertyin classPropertySource<software.amazon.awssdk.services.appconfigdata.AppConfigDataClient>
-