VMware offers training and certification to turbo-charge your progress.Learn more
The Spring Cloud GCP project makes the Spring Framework a first-class citizen of Google Cloud Platform (GCP).
Spring Cloud GCP is no longer part of the Spring Cloud release train. The new repository location is https://github.com/GoogleCloudPlatform/spring-cloud-gcp. If you are upgrading from version 1.x, take a look at the migration guide to upgrade from version 1.x to 2.0.0 (or later).
Spring Cloud GCP offers a wide collection of libraries that make it easier to use Google Cloud Platform from Spring Framework applications.
Project features include:
Spring Cloud GCP Pub/Sub Support (Spring Integration and Spring Cloud Stream Binder)
Spring Data Cloud Spanner
Spring Data Cloud Datastore
Spring Data Reactive Repositories for Cloud Firestore
Spring Data Cloud SQL
Google Cloud Logging, Tracing and Monitoring (formerly Stackdriver)
Google Cloud Storage (Spring Resource and Spring Integration)
Google Cloud Vision API Template
Spring Security identity extraction from Google Cloud IAP or Firebase headers
Google Cloud BigQuery with Spring Integration
Secret Manager property source and API Template
KMS key encryption/decryption API Template
All Spring Cloud GCP artifacts are made available through Maven Central.
If you’re using Maven, you should first add the Spring Cloud GCP Bill of Materials (BOM) to your
pom.xml. This will help you manage the version numbers of
spring-cloud-gcp dependencies in your project.
<dependencyManagement> <dependencies> <dependency> <groupId>com.google.cloud</groupId> <artifactId>spring-cloud-gcp-dependencies</artifactId> <version>4.1.2</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
Spring Cloud GCP offers starter dependencies through Maven to easily depend on different modules of the library. Each starter contains all the dependencies and transitive dependencies needed to begin using their corresponding Spring Cloud GCP module.
The best way to learn how to use Spring Cloud GCP is to consult the sample applications on Github.
The table below highlights several samples of the most commonly used integrations in Spring Cloud GCP.
|GCP Integration||Sample Application|
|Cloud SQL (w/ MySQL)||spring-cloud-gcp-sql-mysql-sample|
|Google Cloud Logging||spring-cloud-gcp-logging-sample|
|Google Cloud Tracing||spring-cloud-gcp-trace-sample|
|Cloud Security - IAP||spring-cloud-gcp-security-iap-sample|
Spring Initializr is a tool which generates the scaffolding code for a new Spring Boot project. It handles the work of generating the Maven or Gradle build file so you do not have to manually add the dependencies yourself.
Spring Initializr offers three modules from Spring Cloud GCP that you can use to generate your project.
GCP Support: The GCP Support module contains auto-configuration support for every Spring Cloud GCP integration. Most of the autoconfiguration code is only enabled if the required dependency is added to your project.
GCP Messaging: Google Cloud Pub/Sub integrations work out of the box.
GCP Storage: Google Cloud Storage integrations work out of the box.
Spring Cloud GCP is an actively maintained project and we encourage users to raise issues and ask questions about the project.
We actively monitor the following communication channels:
Spring Cloud GCP Github Repository: Post an issue in our Github repository to ask questions, make a bug report, file feature requests, etc.
Spring Cloud GCP Gitter Lobby: Ask questions and talk to the developers in our Gitter chatroom.
Bootstrap your application with Spring Initializr.