Skip to content

Commit 36dd334

Browse files
committed
Updates readme
1 parent 67c2a0d commit 36dd334

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,40 @@ repositories {
1414
}
1515
```
1616
```groovy
17-
compile "com.spring.loader:s3-loader:1.0.2"
17+
compile "com.spring.loader:s3-loader:1.0.3"
1818
```
1919
Maven:
2020
```xml
2121
<dependency>
2222
<groupId>com.spring.loader</groupId>
2323
<artifactId>s3-loader</artifactId>
24-
<version>1.0.2</version>
24+
<version>1.0.3</version>
2525
<type>pom</type>
2626
</dependency>
2727
```
28+
2829
## How to use
2930

30-
Declare a spring bean `S3PropertyPlaceholderConfigurer` using yours AWS credencials or AWS instance profile. e.i:
31+
There 2 ways to configure your application to load properties from s3:
32+
33+
*Anotation*
34+
Add this annotation to any spring managed bean
35+
```java
36+
@S3PropertiesLocation("my-bucket/my-folder/my-properties.properties")
37+
```
3138

39+
*Configuration*
3240
```java
3341
@Bean
34-
S3PropertyPlaceholderConfigurer s3PropertyPlaceholderConfigurer(AmazonS3 s3) {
35-
S3PropertyPlaceholderConfigurer s3PropertyPlaceholderConfigurer = new S3PropertyPlaceholderConfigurer(s3);
42+
S3PropertyPlaceholderConfigurer s3PropertyPlaceholderConfigurer(AmazonS3 amazonS3) {
43+
S3PropertyPlaceholderConfigurer s3PropertyPlaceholderConfigurer = new S3PropertyPlaceholderConfigurer(amazonS3);
3644
s3PropertyPlaceholderConfigurer.setS3Locations("s3://my-bucket/my-folder/my-properties.properties");
3745

3846
return s3PropertyPlaceholderConfigurer;
3947
}
4048
```
49+
50+
## Requisites
51+
52+
Official spring aws sdk lib.
53+
See: https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-aws

0 commit comments

Comments
 (0)