Skip to content

Commit

Permalink
add profile to example for AWS S3 (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenek-jonas authored Jul 31, 2024
1 parent 690445f commit 57db4c3
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/spring-boot3-simple/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,22 @@
</plugins>
</build>

<profiles>
<profile>
<id>awss3</id>
<dependencies>
<dependency>
<groupId>org.eclipse.store</groupId>
<artifactId>afs-aws-s3</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.26.14</version>
</dependency>
</dependencies>
</profile>
</profiles>

</project>
15 changes: 15 additions & 0 deletions examples/spring-boot3-simple/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,18 @@ curl --location --request POST 'http://localhost:8080/add' \
--header 'Content-Type: application/json' \
--data-raw '{great new joke}'
```

## Using Example with AWS S3
We have prepared a sample configuration for using AWS S3. To use it, please follow these steps:
1. In the application-awss3.properties file, set the following properties:

`org.eclipse.store.storage-directory=bucket/jokes_storage`
Replace bucket with your actual bucket name.
2. Build the application with the following command:
```shell
mvn -Pawss3 clean package
```
3. Run the application with the following command:
```shell
java -jar -Dspring.profiles.active=awss3 target/spring-boot3-simple.jar
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
org.eclipse.store.auto-start=true
org.eclipse.store.root=org.microstream.spring.boot.example.simple.model.Root
org.eclipse.store.storage-directory=bucket/jokes_storage

org.eclipse.store.storage-filesystem.aws.s3.credentials.type=default
org.eclipse.store.storage-filesystem.aws.s3.region=eu-central-1
org.eclipse.store.storage-filesystem.target=aws.s3

org.eclipse.store.rest.enabled=true


springdoc.swagger-ui.try-it-out-enabled=true
springdoc.swagger-ui.url=/v3/api-docs

vaadin.url-mapping=/store-console/*

0 comments on commit 57db4c3

Please sign in to comment.