This is a demo application that collects data and ingests it to S3 bucket using the spring-webflux functional ways and the logback library.
git clone https://github.com/simplydemo/spring-reactive-collector-s3.git
mvn clean package -DskipTests=true
java -jar -Daws.region=<your-aws-region> -Daws.bucket=<your-aws-bucket> -Daws.profile=<your-aws-profile> target/spring-reactive-collector-s3-1.0.0-SNAPSHOT.jar
docker build -t "spring-reactive-collector-s3:latest" -f ./cicd/docker/Dockerfile .
ECS 서비스가 S3 를 액세스 할수있도록 TASK Role 을 구성 하여야 합니다.
docker run --rm --name spring-reactive-collector-s3 \
-e AWS_REGION="<your-aws-region>" \
-e AWS_BUCKET="<your-aws-bucket>" \
--publish "0.0.0.0:8080:8080" spring-reactive-collector-s3:latest
docker run --rm --name spring-reactive-collector-s3 \
-e AWS_REGION="<your-aws-region>" \
-e AWS_BUCKET="<your-aws-bucket>" \
-e AWS_PROFILE="<your-aws-profile>" \
-v $HOME/.aws:/home/spring/.aws:ro \
--publish "0.0.0.0:8080:8080" spring-reactive-collector-s3:latest
curl --location 'http://localhost:8080/api/collect' \
--header 'Content-Type: application/json' \
--data '{"id":"I1000","name":"mhit8m7dw6","birthday":"1977-11-27","height":175,"weight":73,"timestamp":1681270178378}'
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Reactive Web
The following guides illustrate how to use some features concretely: