File tree Expand file tree Collapse file tree 1 file changed +4
-18
lines changed Expand file tree Collapse file tree 1 file changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -14,24 +14,20 @@ repositories {
14
14
}
15
15
```
16
16
``` groovy
17
- compile "com.spring.loader:s3-loader:1 .0.4 "
17
+ compile "com.spring.loader:s3-loader:2 .0.0 "
18
18
```
19
19
Maven:
20
20
``` xml
21
21
<dependency >
22
22
<groupId >com.spring.loader</groupId >
23
23
<artifactId >s3-loader</artifactId >
24
- <version >1 .0.4 </version >
24
+ <version >2 .0.0 </version >
25
25
<type >pom</type >
26
26
</dependency >
27
27
```
28
28
29
29
## How to use
30
30
31
- There 2 ways to configure your application to load properties from s3:
32
-
33
- ** Anotation**
34
-
35
31
- Adding this annotation to any spring managed bean
36
32
``` java
37
33
@S3PropertiesLocation (" my-bucket/my-folder/my-properties.properties" )
@@ -42,20 +38,10 @@ There 2 ways to configure your application to load properties from s3:
42
38
```
43
39
- Load from a System env variable
44
40
``` java
45
- @S3PropertiesLocation (path = " ${AWS_S3_LOCATION}" , profiles = " production" )
46
- ```
47
- ** Configuration**
48
- ``` java
49
- @Bean
50
- S3PropertyPlaceholderConfigurer s3PropertyPlaceholderConfigurer(AmazonS3 amazonS3) {
51
- S3PropertyPlaceholderConfigurer s3PropertyPlaceholderConfigurer = new S3PropertyPlaceholderConfigurer (amazonS3);
52
- s3PropertyPlaceholderConfigurer. setS3Locations(" s3://my-bucket/my-folder/my-properties.properties" );
53
-
54
- return s3PropertyPlaceholderConfigurer;
55
- }
41
+ @S3PropertiesLocation (path = " ${AWS_S3_LOCATION}" , profiles = " developer" )
56
42
```
57
43
58
44
## Requisites
59
45
60
46
Official spring aws sdk lib.
61
- See: https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-aws
47
+ See: https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-aws
You can’t perform that action at this time.
0 commit comments