From 1ddc37253db5b759f6ec54df29d5b4c52fa26304 Mon Sep 17 00:00:00 2001 From: Eric Dallo Date: Thu, 2 Mar 2017 15:37:34 -0300 Subject: [PATCH] Update README.md --- README.md | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 3fa7957..49cdf77 100644 --- a/README.md +++ b/README.md @@ -14,24 +14,20 @@ repositories { } ``` ```groovy -compile "com.spring.loader:s3-loader:1.0.4" +compile "com.spring.loader:s3-loader:2.0.0" ``` Maven: ```xml com.spring.loader s3-loader - 1.0.4 + 2.0.0 pom ``` ## How to use -There 2 ways to configure your application to load properties from s3: - -**Anotation** - - Adding this annotation to any spring managed bean ```java @S3PropertiesLocation("my-bucket/my-folder/my-properties.properties") @@ -42,20 +38,10 @@ There 2 ways to configure your application to load properties from s3: ``` - Load from a System env variable ```java -@S3PropertiesLocation(path = "${AWS_S3_LOCATION}", profiles = "production") -``` -**Configuration** -```java -@Bean -S3PropertyPlaceholderConfigurer s3PropertyPlaceholderConfigurer(AmazonS3 amazonS3) { - S3PropertyPlaceholderConfigurer s3PropertyPlaceholderConfigurer = new S3PropertyPlaceholderConfigurer(amazonS3); - s3PropertyPlaceholderConfigurer.setS3Locations("s3://my-bucket/my-folder/my-properties.properties"); - - return s3PropertyPlaceholderConfigurer; -} +@S3PropertiesLocation(path = "${AWS_S3_LOCATION}", profiles = "developer") ``` ## Requisites Official spring aws sdk lib. -See: https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-aws \ No newline at end of file +See: https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-aws