Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 537e6f6

Browse files
edgarRSV4artembilan
authored andcommitted
GH-193: Migrate to new Spring Cloud AWS group
Fixes #193 Starting with version `2.3` Spring Cloud AWS has been moved to new Maven coordinates. * Change `org.springframework.cloud` for SC-AWS to new `io.awspring.cloud` * Fix imports for new package * Fix links, coordinates and pacakges in docs
1 parent 57ccd1f commit 537e6f6

28 files changed

+71
-68
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@ Spring Integration Extension for Amazon Web Services (AWS)
55

66
## Amazon Web Services (AWS)
77

8-
Launched in 2006, [Amazon Web Services][] (AWS) provides key infrastructure services for business through its cloud computing platform. Using cloud computing businesses can adopt a new business model whereby they do not have to plan and invest in procuring their own IT infrastructure. They can use the infrastructure and services provided by the cloud service provider and pay as they use the services. Visit [https://aws.amazon.com/products/] for more details about various products offered by Amazon as a part their cloud computing services.
8+
Launched in 2006, [Amazon Web Services][] (AWS) provides key infrastructure services for business through its cloud computing platform.
9+
Using cloud computing businesses can adopt a new business model whereby they do not have to plan and invest in procuring their own IT infrastructure.
10+
They can use the infrastructure and services provided by the cloud service provider and pay as they use the services. Visit [AWS Products](https://aws.amazon.com/products/) for more details about various products offered by Amazon as a part their cloud computing services.
911

1012
*Spring Integration Extension for Amazon Web Services* provides Spring Integration adapters for the various services provided by the [AWS SDK for Java][].
1113
Note the Spring Integration AWS Extension is based on the [Spring Cloud AWS][] project.
1214

1315
## Spring Integration's extensions to AWS
1416

15-
The current project version is `2.4.x` and it requires minimum Java `8` and Spring Integration `5.4.x`.
16-
Can be used with Spring Cloud `2020.0.x`.
17+
The current project version is `2.5.x` and it requires minimum Java `8` and Spring Integration `5.5.x`.
18+
Can be used with Spring Cloud `2020.0.x` Spring Cloud AWS `2.3.x`.
1719

1820
This guide intends to explain briefly the various adapters available for [Amazon Web Services][] such as:
1921

2022
* **Amazon Simple Email Service (SES)**
2123
* **Amazon Simple Storage Service (S3)**
2224
* **Amazon Simple Queue Service (SQS)**
2325
* **Amazon Simple Notification Service (SNS)**
24-
* **Amazon DynamoDB** (Analysis ongoing)
25-
* **Amazon SimpleDB** (Not initiated)
26+
* **Amazon DynamoDB**
2627

2728
Sample XML Namespace configurations for each adapter as well as sample code snippets are provided wherever necessary.
2829
Of the above libraries, *SES* and *SNS* provide outbound adapters only. All other services have inbound and outbound adapters. The *SQS* inbound adapter is capable of receiving notifications sent out from *SNS* where the topic is an *SQS* Queue.
@@ -37,7 +38,7 @@ Additionally, if you are contributing, we recommend following the process for Sp
3738

3839
These dependencies are optional in the project:
3940

40-
* `org.springframework.cloud:spring-cloud-aws-messaging` - for SQS and SNS channel adapters
41+
* `io.awspring.cloud:spring-cloud-aws-messaging` - for SQS and SNS channel adapters
4142
* `org.springframework.integration:spring-integration-file` - for S3 channel adapters
4243
* `org.springframework.integration:spring-integration-http` - for SNS inbound channel adapter
4344
* `com.amazonaws:aws-java-sdk-kinesis` - for Kinesis channel adapters
@@ -294,7 +295,8 @@ See `SqsHeaderMapper` implementation for more information and also consult with
294295

295296
### Inbound Channel Adapter
296297

297-
The SQS Inbound Channel Adapter is a `message-driven` implementation for the `MessageProducer` and is represented with `SqsMessageDrivenChannelAdapter`. This channel adapter is based on the `org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer` to receive messages from the provided `queues` in async manner and send an enhanced Spring Integration Message to the provided `MessageChannel`.
298+
The SQS Inbound Channel Adapter is a `message-driven` implementation for the `MessageProducer` and is represented with `SqsMessageDrivenChannelAdapter`.
299+
This channel adapter is based on the `io.awspring.cloud.messaging.listener.SimpleMessageListenerContainer` to receive messages from the provided `queues` in async manner and send an enhanced Spring Integration Message to the provided `MessageChannel`.
298300
The enhancements include `AwsHeaders.MESSAGE_ID`, `AwsHeaders.RECEIPT_HANDLE` and `AwsHeaders.RECEIVED_QUEUE` message headers.
299301

300302
The Java Configuration is pretty simple:
@@ -640,7 +642,7 @@ When used with a shared `MessageGroupStore`, the `DynamoDbLockRegistry` can be u
640642
This implementation can also be used for the distributed leader elections using a [LockRegistryLeaderInitiator][].
641643
The `com.amazonaws:dynamodb-lock-client` dependency must be present to make a `DynamoDbLockRegistry` working.
642644

643-
[Spring Cloud AWS]: https://github.com/spring-cloud/spring-cloud-aws
645+
[Spring Cloud AWS]: https://awspring.io/
644646
[AWS SDK for Java]: https://aws.amazon.com/sdkforjava/
645647
[Amazon Web Services]: https://aws.amazon.com/
646648
[https://aws.amazon.com/products/]: https://aws.amazon.com/products/

build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ext {
3434
servletApiVersion = '4.0.1'
3535
localstackVersion = '0.2.6'
3636
log4jVersion = '2.14.1'
37-
springCloudAwsVersion = '2.2.5.RELEASE'
37+
springCloudAwsVersion = '2.3.0'
3838
springIntegrationVersion = '5.5.0-SNAPSHOT'
3939
kinesisClientVersion = '1.14.0'
4040
kinesisProducerVersion = '0.14.3'
@@ -85,7 +85,7 @@ dependencyManagement {
8585
enabled = false
8686
}
8787
imports {
88-
mavenBom "org.springframework.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion"
88+
mavenBom "io.awspring.cloud:spring-cloud-aws-dependencies:$springCloudAwsVersion"
8989
mavenBom "org.springframework.integration:spring-integration-bom:$springIntegrationVersion"
9090
mavenBom "com.fasterxml.jackson:jackson-bom:$jacksonVersion"
9191
mavenBom "org.junit:junit-bom:$junitVersion"
@@ -103,10 +103,10 @@ checkstyle {
103103

104104
dependencies {
105105
api 'org.springframework.integration:spring-integration-core'
106-
api 'org.springframework.cloud:spring-cloud-aws-core'
106+
api 'io.awspring.cloud:spring-cloud-aws-core'
107107
api 'com.fasterxml.jackson.core:jackson-databind'
108108

109-
optionalApi 'org.springframework.cloud:spring-cloud-aws-messaging'
109+
optionalApi 'io.awspring.cloud:spring-cloud-aws-messaging'
110110
optionalApi 'org.springframework.integration:spring-integration-file'
111111
optionalApi 'org.springframework.integration:spring-integration-http'
112112

src/main/java/org/springframework/integration/aws/inbound/SnsInboundChannelAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,8 +22,6 @@
2222
import java.util.List;
2323
import java.util.Map;
2424

25-
import org.springframework.cloud.aws.messaging.endpoint.NotificationStatus;
26-
import org.springframework.cloud.aws.messaging.endpoint.NotificationStatusHandlerMethodArgumentResolver;
2725
import org.springframework.expression.EvaluationContext;
2826
import org.springframework.expression.Expression;
2927
import org.springframework.http.HttpHeaders;
@@ -44,6 +42,8 @@
4442

4543
import com.amazonaws.services.sns.AmazonSNS;
4644
import com.fasterxml.jackson.databind.JsonNode;
45+
import io.awspring.cloud.messaging.endpoint.NotificationStatus;
46+
import io.awspring.cloud.messaging.endpoint.NotificationStatusHandlerMethodArgumentResolver;
4747

4848
/**
4949
* The {@link HttpRequestHandlingMessagingGateway} extension for the Amazon WS SNS HTTP(S)

src/main/java/org/springframework/integration/aws/inbound/SqsMessageDrivenChannelAdapter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,11 +24,6 @@
2424

2525
import org.springframework.beans.factory.BeanCreationException;
2626
import org.springframework.beans.factory.DisposableBean;
27-
import org.springframework.cloud.aws.core.env.ResourceIdResolver;
28-
import org.springframework.cloud.aws.messaging.config.SimpleMessageListenerContainerFactory;
29-
import org.springframework.cloud.aws.messaging.listener.QueueMessageHandler;
30-
import org.springframework.cloud.aws.messaging.listener.SimpleMessageListenerContainer;
31-
import org.springframework.cloud.aws.messaging.listener.SqsMessageDeletionPolicy;
3227
import org.springframework.core.task.AsyncTaskExecutor;
3328
import org.springframework.integration.aws.support.AwsHeaders;
3429
import org.springframework.integration.endpoint.MessageProducerSupport;
@@ -43,6 +38,11 @@
4338
import org.springframework.util.Assert;
4439

4540
import com.amazonaws.services.sqs.AmazonSQSAsync;
41+
import io.awspring.cloud.core.env.ResourceIdResolver;
42+
import io.awspring.cloud.messaging.config.SimpleMessageListenerContainerFactory;
43+
import io.awspring.cloud.messaging.listener.QueueMessageHandler;
44+
import io.awspring.cloud.messaging.listener.SimpleMessageListenerContainer;
45+
import io.awspring.cloud.messaging.listener.SqsMessageDeletionPolicy;
4646

4747
/**
4848
* The {@link MessageProducerSupport} implementation for the Amazon SQS

src/main/java/org/springframework/integration/aws/outbound/S3MessageHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.io.IOException;
2222
import java.io.InputStream;
2323

24-
import org.springframework.cloud.aws.core.env.ResourceIdResolver;
2524
import org.springframework.expression.EvaluationContext;
2625
import org.springframework.expression.Expression;
2726
import org.springframework.expression.common.LiteralExpression;
@@ -56,6 +55,7 @@
5655
import com.amazonaws.services.s3.transfer.internal.S3ProgressListenerChain;
5756
import com.amazonaws.util.Base64;
5857
import com.amazonaws.util.Md5Utils;
58+
import io.awspring.cloud.core.env.ResourceIdResolver;
5959

6060
/**
6161
* The {@link AbstractReplyProducingMessageHandler} implementation for the Amazon S3

src/main/java/org/springframework/integration/aws/outbound/SnsMessageHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,7 +20,6 @@
2020
import java.util.Map;
2121
import java.util.concurrent.Future;
2222

23-
import org.springframework.cloud.aws.core.env.ResourceIdResolver;
2423
import org.springframework.expression.Expression;
2524
import org.springframework.expression.TypeLocator;
2625
import org.springframework.expression.common.LiteralExpression;
@@ -39,6 +38,7 @@
3938
import com.amazonaws.services.sns.model.MessageAttributeValue;
4039
import com.amazonaws.services.sns.model.PublishRequest;
4140
import com.amazonaws.services.sns.model.PublishResult;
41+
import io.awspring.cloud.core.env.ResourceIdResolver;
4242

4343
/**
4444
* The {@link AbstractAwsMessageHandler} implementation to send SNS Notifications

src/main/java/org/springframework/integration/aws/outbound/SqsMessageHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,8 +20,6 @@
2020
import java.util.Map;
2121
import java.util.concurrent.Future;
2222

23-
import org.springframework.cloud.aws.core.env.ResourceIdResolver;
24-
import org.springframework.cloud.aws.messaging.support.destination.DynamicQueueUrlDestinationResolver;
2523
import org.springframework.expression.Expression;
2624
import org.springframework.expression.common.LiteralExpression;
2725
import org.springframework.integration.aws.support.AwsHeaders;
@@ -45,6 +43,8 @@
4543
import com.amazonaws.services.sqs.model.SendMessageBatchResult;
4644
import com.amazonaws.services.sqs.model.SendMessageRequest;
4745
import com.amazonaws.services.sqs.model.SendMessageResult;
46+
import io.awspring.cloud.core.env.ResourceIdResolver;
47+
import io.awspring.cloud.messaging.support.destination.DynamicQueueUrlDestinationResolver;
4848

4949
/**
5050
* The {@link AbstractMessageHandler} implementation for the Amazon SQS

src/main/java/org/springframework/integration/aws/support/AbstractMessageAttributesHeaderMapper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2019 the original author or authors.
2+
* Copyright 2018-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,14 +24,15 @@
2424
import org.apache.commons.logging.Log;
2525
import org.apache.commons.logging.LogFactory;
2626

27-
import org.springframework.cloud.aws.messaging.core.MessageAttributeDataTypes;
2827
import org.springframework.integration.mapping.HeaderMapper;
2928
import org.springframework.integration.support.utils.PatternMatchUtils;
3029
import org.springframework.messaging.MessageHeaders;
3130
import org.springframework.util.Assert;
3231
import org.springframework.util.MimeType;
3332
import org.springframework.util.NumberUtils;
3433

34+
import io.awspring.cloud.messaging.core.MessageAttributeDataTypes;
35+
3536
/**
3637
* Base {@link HeaderMapper} implementation for common logic in SQS and SNS around message
3738
* attributes mapping.

src/main/java/org/springframework/integration/aws/support/S3Session.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@
2424

2525
import org.apache.http.HttpStatus;
2626

27-
import org.springframework.cloud.aws.core.env.ResourceIdResolver;
2827
import org.springframework.integration.file.remote.session.Session;
2928
import org.springframework.util.Assert;
3029
import org.springframework.util.StreamUtils;
@@ -40,6 +39,7 @@
4039
import com.amazonaws.services.s3.model.S3Object;
4140
import com.amazonaws.services.s3.model.S3ObjectInputStream;
4241
import com.amazonaws.services.s3.model.S3ObjectSummary;
42+
import io.awspring.cloud.core.env.ResourceIdResolver;
4343

4444
/**
4545
* An Amazon S3 {@link Session} implementation.

src/main/java/org/springframework/integration/aws/support/S3SessionFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2020 the original author or authors.
2+
* Copyright 2016-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,14 +16,14 @@
1616

1717
package org.springframework.integration.aws.support;
1818

19-
import org.springframework.cloud.aws.core.env.ResourceIdResolver;
2019
import org.springframework.integration.file.remote.session.SessionFactory;
2120
import org.springframework.integration.file.remote.session.SharedSessionCapable;
2221
import org.springframework.util.Assert;
2322

2423
import com.amazonaws.services.s3.AmazonS3;
2524
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
2625
import com.amazonaws.services.s3.model.S3ObjectSummary;
26+
import io.awspring.cloud.core.env.ResourceIdResolver;
2727

2828
/**
2929
* An Amazon S3 specific {@link SessionFactory} implementation. Also this class implements

0 commit comments

Comments
 (0)