@Configuration
@EnableConfigurationProperties
@AutoConfigureAfter(value={org.springframework.cloud.aws.autoconfigure.context.ContextCredentialsAutoConfiguration.class,org.springframework.cloud.aws.autoconfigure.context.ContextInstanceDataAutoConfiguration.class,org.springframework.cloud.aws.autoconfigure.context.ContextRegionProviderAutoConfiguration.class,org.springframework.cloud.aws.autoconfigure.context.ContextResourceLoaderAutoConfiguration.class,org.springframework.cloud.aws.autoconfigure.context.ContextStackAutoConfiguration.class})
@ConditionalOnBean(value=com.amazonaws.auth.AWSCredentialsProvider.class)
public class AwsAutoConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
S3_JOB_ARCHIVER_PRECEDENCE
Constant for the precedence of the S3 job archive implementation for others to reference if need be.
|
Constructor and Description |
---|
AwsAutoConfiguration() |
Modifier and Type | Method and Description |
---|---|
com.amazonaws.regions.AwsRegionProvider |
awsRegionProvider(org.springframework.cloud.aws.autoconfigure.context.properties.AwsRegionProperties awsRegionProperties)
Get an AWS region provider instance.
|
org.springframework.cloud.aws.autoconfigure.context.properties.AwsS3ResourceLoaderProperties |
awsS3ResourceLoaderProperties()
Provide a configuration properties bean for Spring Cloud resource loader properties if for whatever reason
the
ContextResourceLoaderAutoConfiguration isn't applied by the agent app. |
S3ClientFactory |
s3ClientFactory(com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider,
com.amazonaws.regions.AwsRegionProvider awsRegionProvider,
org.springframework.core.env.Environment environment)
Provide a lazy
S3ClientFactory instance if one is needed by the system. |
S3JobArchiverImpl |
s3JobArchiver(S3ClientFactory s3ClientFactory)
Provide an implementation of
JobArchiver to handle archiving
to S3. |
S3ProtocolResolver |
s3ProtocolResolver(org.springframework.cloud.aws.autoconfigure.context.properties.AwsS3ResourceLoaderProperties resourceLoaderProperties,
S3ClientFactory s3ClientFactory)
Provide an protocol resolver which will allow resources with s3:// prefixes to be resolved by the
application
ResourceLoader provided this bean is eventually added to the
context via the
ConfigurableApplicationContext.addProtocolResolver(ProtocolResolver)
method. |
S3ProtocolResolverRegistrar |
s3ProtocolResolverRegistrar(S3ProtocolResolver s3ProtocolResolver)
Configurer bean which will add the
S3ProtocolResolver to the set of ProtocolResolver in the
application context. |
public static final int S3_JOB_ARCHIVER_PRECEDENCE
Ordered
,
Constant Field Values@Bean @ConditionalOnMissingBean(value=com.amazonaws.regions.AwsRegionProvider.class) public com.amazonaws.regions.AwsRegionProvider awsRegionProvider(org.springframework.cloud.aws.autoconfigure.context.properties.AwsRegionProperties awsRegionProperties)
awsRegionProperties
- The cloud.aws.region.* properties@Bean @ConditionalOnMissingBean(value=S3ClientFactory.class) public S3ClientFactory s3ClientFactory(com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, com.amazonaws.regions.AwsRegionProvider awsRegionProvider, org.springframework.core.env.Environment environment)
S3ClientFactory
instance if one is needed by the system.awsCredentialsProvider
- The AWSCredentialsProvider
to useawsRegionProvider
- The AwsRegionProvider
to useenvironment
- The Spring application Environment
to bind properties fromS3ClientFactory
instance@Bean @ConditionalOnMissingBean(value=org.springframework.cloud.aws.autoconfigure.context.properties.AwsS3ResourceLoaderProperties.class) @ConfigurationProperties(value="cloud.aws.loader") public org.springframework.cloud.aws.autoconfigure.context.properties.AwsS3ResourceLoaderProperties awsS3ResourceLoaderProperties()
ContextResourceLoaderAutoConfiguration
isn't applied by the agent app.AwsS3ResourceLoaderProperties
instance with the bindings from cloud.aws.loader values@Bean @ConditionalOnMissingBean(value=S3ProtocolResolver.class) public S3ProtocolResolver s3ProtocolResolver(org.springframework.cloud.aws.autoconfigure.context.properties.AwsS3ResourceLoaderProperties resourceLoaderProperties, S3ClientFactory s3ClientFactory)
ResourceLoader
provided this bean is eventually added to the
context via the
ConfigurableApplicationContext.addProtocolResolver(ProtocolResolver)
method.resourceLoaderProperties
- The AwsS3ResourceLoaderProperties
instance to uses3ClientFactory
- The S3ClientFactory
instance to useS3ProtocolResolver
instance@Bean @ConditionalOnMissingBean(value=S3ProtocolResolverRegistrar.class) public S3ProtocolResolverRegistrar s3ProtocolResolverRegistrar(S3ProtocolResolver s3ProtocolResolver)
S3ProtocolResolver
to the set of ProtocolResolver
in the
application context.s3ProtocolResolver
- The implementation of S3ProtocolResolver
to useS3ProtocolResolverRegistrar
instance@Bean @Order(value=-2147483638) public S3JobArchiverImpl s3JobArchiver(S3ClientFactory s3ClientFactory)
JobArchiver
to handle archiving
to S3.s3ClientFactory
- The factory for creating S3 clientsS3JobArchiverImpl
instance