Spring S3 properties loader.

The aim of this library is to provide a simple mechanism to load configuration properties from a properties file stored in AWS S3.

License

License

GroupId

GroupId

cloud.cirrusup
ArtifactId

ArtifactId

spring-s3-properties-loader
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Spring S3 properties loader.
The aim of this library is to provide a simple mechanism to load configuration properties from a properties file stored in AWS S3.
Project URL

Project URL

https://github.com/cirrus-up-cloud/spring-s3-properties-loader
Source Code Management

Source Code Management

http://github.com/cirrus-up-cloud/spring-s3-properties-loader

Download spring-s3-properties-loader

How to add to project

<!-- https://jarcasting.com/artifacts/cloud.cirrusup/spring-s3-properties-loader/ -->
<dependency>
    <groupId>cloud.cirrusup</groupId>
    <artifactId>spring-s3-properties-loader</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/cloud.cirrusup/spring-s3-properties-loader/
implementation 'cloud.cirrusup:spring-s3-properties-loader:1.0'
// https://jarcasting.com/artifacts/cloud.cirrusup/spring-s3-properties-loader/
implementation ("cloud.cirrusup:spring-s3-properties-loader:1.0")
'cloud.cirrusup:spring-s3-properties-loader:jar:1.0'
<dependency org="cloud.cirrusup" name="spring-s3-properties-loader" rev="1.0">
  <artifact name="spring-s3-properties-loader" type="jar" />
</dependency>
@Grapes(
@Grab(group='cloud.cirrusup', module='spring-s3-properties-loader', version='1.0')
)
libraryDependencies += "cloud.cirrusup" % "spring-s3-properties-loader" % "1.0"
[cloud.cirrusup/spring-s3-properties-loader "1.0"]

Dependencies

compile (10)

Group / Artifact Type Version
com.amazonaws : aws-java-sdk-s3 jar 1.11.397
commons-lang : commons-lang jar 2.6
commons-io : commons-io jar 2.4
com.google.guava : guava jar 19.0
org.slf4j : slf4j-api jar 1.7.5
org.slf4j : jcl-over-slf4j jar 1.7.5
org.springframework : spring-context-support jar 5.1.5.RELEASE
javax.validation : validation-api jar 1.0.0.GA
junit : junit jar 4.12
org.mockito : mockito-core jar 2.0.5-beta

runtime (1)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.5

Project Modules

There are no modules declared in this project.

Spring S3 Properties Loader

The aim of this library is to provide a simple mechanism to load configuration properties from a properties file stored in AWS S3.

How to use it

  1. Add dependency into pom.xml.
<dependency>
    <groupId>cloud.cirrusup</groupId>
    <artifactId>spring-s3-properties-loader</artifactId>
    <version>1.0</version>
</dependency>
  1. In your Spring XML files, simply define a PropertySourcesPlaceholderConfigurer, as it follows:
<bean id="s3PropertyPlaceholder" class="cloud.cirrusup.S3PropertySourcesPlaceholderConfigurer">
        <constructor-arg name="amazonS3" ref="amazonS3"/>
        <constructor-arg name="bucket" value="your-bucket"/>
        <constructor-arg name="fileName" value="path/to/file.properties"/>
</bean>

In order to get the maximum flexibility, you can set values for bucket and filename using Java system properties.

<bean id="s3PropertyPlaceholder" class="cloud.cirrusup.S3PropertySourcesPlaceholderConfigurer">
        <constructor-arg name="amazonS3" ref="amazonS3"/>
        <constructor-arg name="bucket" value="#{systemProperties['s3.config.bucket']}"/>
        <constructor-arg name="fileName" value="#{systemProperties['s3.config.filename']}"/>
</bean>

Versions

Version
1.0