Skip to content

Commit fa1282f

Browse files
committed
Merge branch 'main' into #706
2 parents 7760113 + 926f68c commit fa1282f

File tree

286 files changed

+23768
-1516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+23768
-1516
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Java CI with Maven
22

33
on:
44
push:
5-
branches: [ main, 2.3.x, 2.4.x, 3.0.x, 3.1.x, 3.2.x ]
5+
branches: [ main, 2.3.x, 2.4.x, 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x ]
66
pull_request:
7-
branches: [ main, 2.3.x, 2.4.x, 3.0.x, 3.1.x, 3.2.x ]
7+
branches: [ main, 2.3.x, 2.4.x, 3.0.x, 3.1.x, 3.2.x, 3.3.x, 3.4.x ]
88

99
permissions:
1010
contents: read
@@ -14,10 +14,10 @@ jobs:
1414
name: Test with JDK ${{ matrix.version }}
1515
strategy:
1616
matrix:
17-
version: [ 17.0.12, 21.0.4 ]
17+
version: [ 17.0.12, 21.0.4, 24 ]
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121
- name: Set up JDK ${{ matrix.version }}
2222
uses: actions/setup-java@v4
2323
with:
@@ -32,7 +32,7 @@ jobs:
3232
# Disable Sonar for foreign PRs
3333
if: (github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository))
3434
steps:
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v5
3636
- name: Set up JDK 17
3737
uses: actions/setup-java@v4
3838
with:

.github/workflows/issue-triager.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616

1717
- uses: damccorm/tag-ur-it@master
1818
with:

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- v3.1.*
1010
- v3.2.*
1111
- v3.3.*
12+
- v3.4.*
1213

1314
env:
1415
# https://github.com/actions/checkout/issues/440#issuecomment-854240996
@@ -25,7 +26,7 @@ jobs:
2526
version: [ 17.0.12 ]
2627
runs-on: ubuntu-22.04
2728
steps:
28-
- uses: actions/checkout@v4
29+
- uses: actions/checkout@v5
2930
- name: Set up JDK ${{ matrix.version }}
3031
uses: actions/setup-java@v4
3132
with:

.github/workflows/upload-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
runs-on: ubuntu-22.04
2525

2626
steps:
27-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
2828
- name: Set up JDK 17
2929
uses: actions/setup-java@v4
3030
with:

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ clean:
1111

1212
docs:
1313
mvnd verify -Pdocs-classic -DskipTests=true
14+
15+
docs-full:
16+
mvnd verify javadoc:aggregate -Pdocs-classic -DskipTests=true

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ Spring Cloud AWS simplifies using AWS managed services in a Spring and Spring Bo
66

77
For a deep dive into the project, refer to the Spring Cloud AWS documentation:
88

9-
| Version | Reference Docs | API Docs |
10-
|----------------------------|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
11-
| Spring Cloud AWS 3.3.0-RC1 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.3.0-M1/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.3.0-RC1/apidocs/index.html) |
12-
| Spring Cloud AWS 3.2.1 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.2.1/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.2.1/apidocs/index.html) |
13-
| Spring Cloud AWS 3.1.1 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.1.1/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.1.1/apidocs/index.html) |
14-
| Spring Cloud AWS 3.0.4 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.0.4/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.0.4/apidocs/index.html) |
15-
| Spring Cloud AWS 2.4.4 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/2.4.4/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/2.4.4/apidocs/index.html) |
16-
| Spring Cloud AWS 2.3.5 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/2.3.5/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/2.3.5/apidocs/index.html) |
9+
| Version | Reference Docs | API Docs |
10+
|------------------------|--------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|
11+
| Spring Cloud AWS 3.4.0 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.4.0/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.4.0/apidocs/index.html) |
12+
| Spring Cloud AWS 3.3.1 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.3.1/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.3.1/apidocs/index.html) |
13+
| Spring Cloud AWS 3.2.1 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.2.1/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.2.1/apidocs/index.html) |
14+
| Spring Cloud AWS 3.1.1 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.1.1/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.1.1/apidocs/index.html) |
15+
| Spring Cloud AWS 3.0.4 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.0.4/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/3.0.4/apidocs/index.html) |
16+
| Spring Cloud AWS 2.4.4 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/2.4.4/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/2.4.4/apidocs/index.html) |
17+
| Spring Cloud AWS 2.3.5 | [Reference Docs](https://docs.awspring.io/spring-cloud-aws/docs/2.3.5/reference/html/index.html) | [API Docs](https://docs.awspring.io/spring-cloud-aws/docs/2.3.5/apidocs/index.html) |
1718

1819
## Sponsors
1920

@@ -33,6 +34,7 @@ This project has dependency and transitive dependencies on Spring Projects. The
3334
| 3.1.x | [2023.0.x](https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2023.0-Release-Notes) (4.0/Kilburn) | 3.2.x | 6.1.x | 2.x |
3435
| 3.2.x | [2023.0.x](https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2023.0-Release-Notes) (4.0/Kilburn) | 3.2.x, 3.3.x | 6.1.x | 2.x |
3536
| 3.3.x | [2024.0.x](https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2024.0-Release-Notes) | 3.4.x | 6.2.x | 2.x |
37+
| 3.4.x | [2025.0.x](https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2025.0-Release-Notes) | 3.5.x | 6.2.x | 2.x |
3638

3739
**Note**: 3.0.0-M2 is the last version compatible with Spring Boot 2.7.x and Spring Cloud 3.1. Starting from 3.0.0-M3, project has switched to Spring Boot 3.0.
3840

docs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.awspring.cloud</groupId>
88
<artifactId>spring-cloud-aws</artifactId>
9-
<version>3.3.0-SNAPSHOT</version>
9+
<version>4.0.0-SNAPSHOT</version>
1010
</parent>
1111
<artifactId>spring-cloud-aws-docs</artifactId>
1212
<packaging>pom</packaging>

docs/src/main/.DS_Store

-6 KB
Binary file not shown.

docs/src/main/asciidoc/_configprops.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
|spring.cloud.aws.dynamodb.endpoint | | Overrides the default endpoint.
3333
|spring.cloud.aws.dynamodb.region | | Overrides the default region.
3434
|spring.cloud.aws.dynamodb.table-prefix | | The prefix used to resolve table names.
35+
|spring.cloud.aws.dynamodb.table-separator | | The word separator used to resolve table names.
3536
|spring.cloud.aws.dynamodb.table-suffix | | The suffix used to resolve table names.
3637
|spring.cloud.aws.endpoint | | Overrides the default endpoint for all auto-configured AWS clients.
3738
|spring.cloud.aws.fips-enabled | | Configure whether the SDK should use the AWS fips endpoints.
@@ -92,10 +93,12 @@
9293
|spring.cloud.aws.sqs.dualstack-enabled | | Configure whether the AWS client should use the AWS dualstack endpoint. Note that not each AWS service supports dual-stack. For complete list check <a href="https://docs.aws.amazon.com/vpc/latest/userguide/aws-ipv6-support.html">AWS services that support IPv6</a>
9394
|spring.cloud.aws.sqs.enabled | `+++true+++` | Enables SQS integration.
9495
|spring.cloud.aws.sqs.endpoint | | Overrides the default endpoint.
96+
|spring.cloud.aws.sqs.listener.auto-startup | | Configure whether SQS listeners are started automatically or not. If set to false, the listener containers need to be started manually.
9597
|spring.cloud.aws.sqs.listener.max-concurrent-messages | | The maximum concurrent messages that can be processed simultaneously for each queue. Note that if acknowledgement batching is being used, the actual maximum number of messages inflight might be higher.
98+
|spring.cloud.aws.sqs.listener.max-delay-between-polls | | The maximum amount of time to wait between consecutive polls to SQS.
9699
|spring.cloud.aws.sqs.listener.max-messages-per-poll | | The maximum number of messages to be retrieved in a single poll to SQS.
97100
|spring.cloud.aws.sqs.listener.poll-timeout | | The maximum amount of time for a poll to SQS.
98101
|spring.cloud.aws.sqs.queue-not-found-strategy | |
99102
|spring.cloud.aws.sqs.region | | Overrides the default region.
100103

101-
|===
104+
|===

docs/src/main/asciidoc/dynamodb.adoc

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ dynamoDbTemplate.save(person);
6262

6363
==== Resolving Table Name
6464

65-
To resolve a table name for an entity, `DynamoDbTemplate` uses a bean of type `DynamoDbTableNameResolver`. The default implementation turns an entity class name into its snake case representation with the possibility of using a table name prefix (optional) and suffix (optional). Specify the `spring.cloud.aws.dynamodb.table-prefix` and `spring.cloud.aws.dynamodb.table-suffix` to provide a table name prefix and suffix. The prefix is prepended to the table name and suffix is appended to the table name. For example, if `spring.cloud.aws.dynamodb.table-prefix` is configured as `foo_` and `spring.cloud.aws.dynamodb.table-suffix` is configured as `_foo2` and the entity class is `Person`, then the default implementation resolves the table name as `foo_person_foo2`. You can configure both properties, only one of them or none. However if you do not specify `spring.cloud.aws.dynamodb.table-prefix` and `spring.cloud.aws.dynamodb.table-suffix`, the table name will be resolved as `person`.
65+
To resolve a table name for an entity, `DynamoDbTemplate` uses a bean of type `DynamoDbTableNameResolver`. The default implementation turns an entity class name into its snake case representation with the possibility of using a table name prefix (optional), suffix (optional), or overriding the separator (optional).
66+
67+
Specify the `spring.cloud.aws.dynamodb.table-prefix` and `spring.cloud.aws.dynamodb.table-suffix` to provide a table name prefix and suffix. The prefix is prepended to the table name and suffix is appended to the table name. For example, if `spring.cloud.aws.dynamodb.table-prefix` is configured as `foo_` and `spring.cloud.aws.dynamodb.table-suffix` is configured as `_foo2` and the entity class is `Person`, then the default implementation resolves the table name as `foo_person_foo2`. You can configure both properties, only one of them or none. However if you do not specify `spring.cloud.aws.dynamodb.table-prefix` and `spring.cloud.aws.dynamodb.table-suffix`, the table name will be resolved as `person`.
68+
69+
Specify the `spring.cloud.aws.dynamodb.table-separator` to override the `_` word separator. For example if `spring.cloud.aws.dynamodb.table-separator` is configured as `-` and the entity class is `MoreComplexPerson`, then the table name will be resolved as `more-complex-person`.
6670

6771
To use a custom implementation, declare a bean of type `DynamoDbTableNameResolver` and it will get injected into `DynamoDbTemplate` automatically during auto-configuration.
6872

@@ -135,6 +139,7 @@ The Spring Boot Starter for DynamoDb provides the following configuration option
135139
| `spring.cloud.aws.dynamodb.region` | Configures region used by `DynamoDbClient`. | No |
136140
| `spring.cloud.aws.dynamodb.table-prefix` | Table name prefix used by the default `DynamoDbTableNameResolver` implementation. | No |
137141
| `spring.cloud.aws.dynamodb.table-suffix` | Table name suffix used by the default `DynamoDbTableNameResolver` implementation. | No |
142+
| `spring.cloud.aws.dynamodb.table-separator` | Table name word separator used by the default `DynamoDbTableNameResolver` implementation. | No | `_`
138143

139144
| `spring.cloud.aws.dynamodb.dax.idle-timeout-millis` |Timeout for idle connections with the DAX cluster. | No | `30000`
140145
| `spring.cloud.aws.dynamodb.dax.url` | DAX cluster endpoint. | Yes |
@@ -181,3 +186,32 @@ Note that `DynamoDbClientCustomizer` beans are applied **after** `AwsSyncClientC
181186

182187
Since it depends on how you will use DynamoDb integration providing a list of IAM policies would be pointless since least privilege model should be used.
183188
To check what IAM policies DynamoDb uses and see which ones you should use please check https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/using-identity-based-policies.html[IAM policies]
189+
190+
[#spring-integration-support]
191+
=== Spring Integration Support
192+
193+
Starting with version 4.0, Spring Cloud AWS provides https://spring.io/projects/spring-integration[Spring Integration] components for Amazon DynamoDB.
194+
195+
The `DynamoDbMetadataStore` is a https://docs.spring.io/spring-integration/reference/meta-data-store.html[`ConcurrentMetadataStore`] implementation to store and retrieve key-value entries in the specific DynamoDB.
196+
It requires a `DynamoDbAsyncClient` and default table name is `SpringIntegrationMetadataStore`.
197+
If the table is not present, the `DynamoDbMetadataStore` creates it on its initialization issuing an async `dynamoDB.createTable()` request.
198+
The table structure is like:
199+
200+
- the `metadataKey` is a string table key as a hash;
201+
- the `metadataValue` is a string for entry value;
202+
- the `expireAt` is time-to-live attribute according to respective algorithm in DynamoDB.
203+
204+
See `DynamoDbMetadataStore` Javadocs for more information.
205+
206+
The `DynamoDbLockRegistry` is an `ExpirableLockRegistry` and `RenewableLockRegistry` implementation for the https://docs.spring.io/spring-integration/reference/distributed-locks.html[`DistributedLock`] abstraction based on DynamoDB table.
207+
The supporting `DynamoDbLockRepository` class is for DynamoDB table management and low-level DynamoDB API interaction.
208+
It requires a `DynamoDbAsyncClient`, and the default table name is `SpringIntegrationLockRegistry`.
209+
210+
The table structure is like:
211+
212+
- the `lockKey` is a string table key as a hash;
213+
- the `lockOwner` is a string for lock record ownership — the instance which holds the lock at the moment;
214+
- the `createdAt` is an `Instant.now().getEpochSecond()` when the lock record was created;
215+
- the `expireAt` is time-to-live attribute according to respective algorithm in DynamoDB.
216+
217+
See `DynamoDbLockRegistry` and `DynamoDbLockRepository` Javadocs for more information.

0 commit comments

Comments
 (0)