領先一步
VMware 提供培訓和認證,助您加速進步。
瞭解更多適用於 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](http://aws.amazon.com/sqs/) 的 Spring Messaging API 實現。
用於 [ElastiCache](http://aws.amazon.com/elasticache/) 的 Spring Cache API 實現。
基於註解的 [SNS](http://aws.amazon.com/sns/) 端點對映 (HTTP)。
透過 [CloudFormation](http://aws.amazon.com/cloudformation/) 堆疊中定義的邏輯名稱訪問資源。
基於 [RDS](http://aws.amazon.com/rds/) 例項邏輯名稱的自動 JDBC DataSource
建立。
用於 [S3](http://aws.amazon.com/s3/) 儲存桶的 Ant 風格路徑匹配 ResourceLoader
。
@MessageMapping("logicalQueueName")
private void receiveMessage(Person person, @Header("SenderId") String senderId) {
// ...
}
@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"));