Spring Cloud for Amazon Web Services适用于 Amazon Web Services 的 Spring Cloud3.0.0

适用于 Amazon Web Services 的 Spring Cloud 是一个社区运营的项目。官方网站是 https://awspring.io/,源代码仓库位于 https://github.com/awspring/spring-cloud-aws

Spring Cloud for Amazon Web Services 简化了与托管的 Amazon Web Services 的集成。它提供了一种便捷的方式,可以使用熟知的 Spring 习惯用法和 API(如消息传递或缓存 API)与 AWS 提供的服务进行交互。开发人员可以围绕托管服务构建应用程序,而无需关注基础设施或维护。

特性

基于注解的 SQS 队列监听器

@MessageMapping("logicalQueueName")
private void receiveMessage(Person person, @Header("SenderId") String senderId) {
    // ...
}

基于注解的 SNS 监听器

@Controller
@RequestMapping("/sns/receive")
public class SnsEndpointController {

@NotificationMessageMapping
public void receiveNotification(@NotificationMessage String message, @NotificationSubject String subject) {
    // ...
}

@NotificationSubscriptionMapping
public void confirmSubscription(NotificationStatus notificationStatus) {
    notificationStatus.confirmSubscription();
}

消息模板

snsTemplate.sendNotification("SnsTopic", "message", "subject");
sqsTemplate.convertAndSend("Queue", new Person("John", "Doe"));
Spring Initializr

快速启动您的项目

领先一步

VMware 提供培训和认证,助您加速进步。

了解更多

获取支持

Tanzu Spring 通过一项简单的订阅,为 OpenJDK™、Spring 和 Apache Tomcat® 提供支持和二进制文件。

了解更多

近期活动

查看 Spring 社区的所有近期活动。

查看全部