Spring Cloud 用于Google Cloud Storage的通道適配器

2024-01-10 14:26 更新

Google Cloud Storage的通道適配器可讓您通過MessageChannels讀寫文件到Google Cloud Storage。

Spring Cloud GCP提供了兩個入站適配器GcsInboundFileSynchronizingMessageSourceGcsStreamingMessageSource,以及一個出站適配器GcsMessageHandler。

spring-cloud-gcp-storage模塊中包含用于Google Cloud Storage的Spring Integration通道適配器。

要為Spring Cloud GCP使用Spring Integration的存儲部分,還必須提供spring-integration-file依賴項,因為它不是可傳遞的。

Maven坐標,使用Spring Cloud GCP BOM:

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-gcp-storage</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.integration</groupId>
    <artifactId>spring-integration-file</artifactId>
</dependency>

Gradle坐標:

dependencies {
    compile group: 'org.springframework.cloud', name: 'spring-cloud-gcp-starter-storage'
    compile group: 'org.springframework.integration', name: 'spring-integration-file'
}
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號