https://github.com/GoogleCloudPlatform/spring-cloud-gcp
New home for Spring Cloud GCP development starting with version 2.0.
https://github.com/GoogleCloudPlatform/spring-cloud-gcp
Last synced: about 2 months ago
JSON representation
New home for Spring Cloud GCP development starting with version 2.0.
- Host: GitHub
- URL: https://github.com/GoogleCloudPlatform/spring-cloud-gcp
- Owner: GoogleCloudPlatform
- License: apache-2.0
- Created: 2020-04-22T18:19:22.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-28T17:43:50.000Z (about 2 months ago)
- Last Synced: 2025-04-29T13:59:41.283Z (about 2 months ago)
- Language: Java
- Homepage:
- Size: 41.4 MB
- Stars: 458
- Watchers: 47
- Forks: 335
- Open Issues: 220
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.adoc
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
- jimsghstars - GoogleCloudPlatform/spring-cloud-gcp - New home for Spring Cloud GCP development starting with version 2.0. (Java)
- awesome-java - Spring Cloud GCP
README
image:https://github.com/GoogleCloudPlatform/spring-cloud-gcp/workflows/Unit%20Tests/badge.svg?branch=main["HEAD Unit Tests", link="https://github.com/GoogleCloudPlatform/spring-cloud-gcp/actions?query=branch%3Amain+workflow%3A%22Unit+Tests%22"]
image:https://github.com/GoogleCloudPlatform/spring-cloud-gcp/workflows/Integration%20Tests/badge.svg?branch=main["HEAD Integration Tests", link="https://github.com/GoogleCloudPlatform/spring-cloud-gcp/actions?query=branch%3Amain+workflow%3A%22Integration+Tests%22"]
image:https://github.com/GoogleCloudPlatform/spring-cloud-gcp/workflows/SonarCloud%20Analysis/badge.svg?branch=main["HEAD SonarCloud Analysis", link="https://github.com/GoogleCloudPlatform/spring-cloud-gcp/actions?query=branch%3Amain+workflow%3A%22SonarCloud+Analysis%22"]
image:https://sonarcloud.io/api/project_badges/measure?project=GoogleCloudPlatform_spring-cloud-gcp&metric=alert_status["Quality Gate Status", link="https://sonarcloud.io/dashboard?id=GoogleCloudPlatform_spring-cloud-gcp"]== Spring Framework on Google Cloud
This project makes it easy for Spring users to run their applications on Google Cloud.
You can check our project website https://spring.io/projects/spring-cloud-gcp[here].For a deep dive into the project, refer to the Spring Framework on Google Cloud Reference documentation or Javadocs:
// {x-version-update-start:spring-cloud-gcp:released}
* link:https://googlecloudplatform.github.io/spring-cloud-gcp/6.1.1/reference/html/index.html[Spring Framework on Google Cloud 6.1.1 (Latest)] - https://googleapis.dev/java/spring-cloud-gcp/6.1.1/index.html[Javadocs 6.1.1]
// {x-version-update-end}
* link:https://googlecloudplatform.github.io/spring-cloud-gcp/5.11.3/reference/html/index.html[Spring Framework on Google Cloud 5.11.3] - https://googleapis.dev/java/spring-cloud-gcp/5.11.3/index.html[Javadocs 5.11.3]
* link:https://googlecloudplatform.github.io/spring-cloud-gcp/4.10.19/reference/html/index.html[Spring Framework on Google Cloud 4.10.19] - https://googleapis.dev/java/spring-cloud-gcp/4.10.19/index.html[Javadocs 4.10.19]
* link:https://googlecloudplatform.github.io/spring-cloud-gcp/3.8.18/reference/html/index.html[Spring Framework on Google Cloud 3.8.18] - https://googleapis.dev/java/spring-cloud-gcp/3.8.18/index.html[Javadocs 3.8.18]If you prefer to learn by doing, try taking a look at the https://github.com/GoogleCloudPlatform/spring-cloud-gcp/tree/main/spring-cloud-gcp-samples[Spring Framework on Google Cloud sample applications] or the https://codelabs.developers.google.com/spring[Spring on Google Cloud codelabs].
Currently, this repository provides support for:
* link:spring-cloud-gcp-pubsub[Spring Framework on Google Cloud Pub/Sub, including Spring Integration Channel Adapters]
* link:spring-cloud-gcp-pubsub-stream-binder[Spring Framework on Google Cloud Pub/Sub Stream Binder]
* link:spring-cloud-gcp-storage[Spring Resource Abstraction for Google Cloud Storage, including Spring Integration Channel Adapters]
* link:spring-cloud-gcp-data-spanner[Spring Data Cloud Spanner]
* link:spring-cloud-gcp-data-datastore[Spring Data Cloud Datastore]
* link:spring-cloud-gcp-data-firestore[Spring Data Cloud Firestore]
* link:spring-cloud-gcp-vision[Google Cloud Vision API Template]
* Spring Boot starters
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter[GCP Support]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-config[Google Cloud Config] (Beta)
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-data-spanner[Google Cloud Spanner]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-data-datastore[Google Cloud Datastore]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-data-firestore[Google Cloud Firestore]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-logging[Google Cloud Logging]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-pubsub[Google Cloud Pub/Sub]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-sql-mysql[Google Cloud SQL MySQL]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-sql-postgresql[Google Cloud SQL PostgreSQL]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-storage[Google Cloud Storage]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-secretmanager[Google Secret Manager]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-security-firebase[Firebase Authentication]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-security-iap[Google Cloud IAP Authentication]
** link:spring-cloud-gcp-starters/spring-cloud-gcp-starter-vision[Google Cloud Vision API]If you have any other ideas, suggestions or bug reports, please use our https://github.com/GoogleCloudPlatform/spring-cloud-gcp/issues[GitHub issue tracker] and let us know!
If you want to collaborate in the project, we would also love to get your Pull Requests.
Before you start working on one, please take a look at our link:CONTRIBUTING.md[collaboration manual].== Compatibility with Spring Project Versions
This project has dependency and transitive dependencies on Spring Projects. The table below outlines the versions of Spring Cloud, Spring Boot and Spring Framework versions that are compatible with certain Spring Framework on Google Cloud version.
|===
| Spring Framework on Google Cloud | Spring Cloud | Spring Boot | Spring Framework | Supported|6.x
|https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2024.0-Release-Notes[2024.0.x] (Moorgate)
|https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.4-Release-Notes[3.4.x]
|https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-6.2-Release-Notes[6.2.x]
|Yes|5.x
|https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2023.0-Release-Notes[2023.0.x] (Leyton)
|https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes[3.2.x]*, https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.3-Release-Notes[3.3.x]* Except trace
|https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-6.x#whats-new-in-version-61[6.1.x]
|Yes|4.x
|https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2022.0-Release-Notes[2022.0.x] (Kilburn)
|https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes[3.0.x], https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.1-Release-Notes[3.1.x]
|https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-6.x#whats-new-in-version-60[6.0.x]
|Yes|3.x
|https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2021.0-Release-Notes[2021.0.x] (Jubilee)
|https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.6-Release-Notes[2.6.x], https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes[2.7.x]
|https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-5.x#whats-new-in-version-53[5.3.x]
|Yes|2.x
|https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2020.0-Release-Notes[2020.0.x] (Ilford)
|https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes[2.4.x], https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.5-Release-Notes[2.5.x]
|https://github.com/spring-projects/spring-framework/wiki/What%27s-New-in-Spring-Framework-5.x#whats-new-in-version-53[5.3.x]
|No
|===
* The Spring Cloud GCP 5.x trace module only supports Spring Boot 3.3.x due to link:https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.3-Release-Notes#brave-and-zipkin[Boot's major version increment] of its Brave and Zipkin dependencies.== Spring Initializr
Spring Initializr contains Spring Framework on Google Cloud auto-configuration support through the `GCP Support` entry.
`GCP Messaging` contains the Spring Framework on Google Cloud messaging support with Google Cloud Pub/Sub working out of the box.
Similarly to `GCP Messaging`, `GCP Storage` contains the Google Cloud Storage support with no other dependencies needed.
== Spring Framework on Google Cloud Bill of Materials (BOM)
If you're a Maven user, add our BOM to your pom.xml `` section.
This will allow you to not specify versions for any of the Maven dependencies and instead delegate versioning to the BOM.// {x-version-update-start:spring-cloud-gcp:released}
[source,xml]
----
com.google.cloud
spring-cloud-gcp-dependencies
6.1.1
pom
import
----
// {x-version-update-end}
== Snapshots Repository
We do not publish `SNAPSHOT` versions of the project. If you would like to test out the latest snapshot, please clone this repository and install locally.
== Spring Boot Starters
Spring Boot greatly simplifies the Spring Framework on Google Cloud experience.
Our starters handle the object instantiation and configuration logic so you don't have to.Every starter depends on the GCP starter to provide critical bits of configuration, like the GCP project ID or OAuth2 credentials location.
You can configure these as properties in, for example, a properties file:[source]
----
spring.cloud.gcp.project-id=[YOUR_GCP_PROJECT_ID]
spring.cloud.gcp.credentials.location=file:[LOCAL_PRIVATE_KEY_FILE]
spring.cloud.gcp.credentials.scopes=[SCOPE_1],[SCOPE_2],[SCOPE_3]
----These properties are optional and, if not specified, Spring Boot will attempt to automatically find them for you.
For details on how Spring Boot finds these properties, refer to the link:https://googlecloudplatform.github.io/spring-cloud-gcp/reference/html/index.html[documentation].NOTE: If your app is running on Google App Engine or Google Compute Engine, in most cases, you should omit the `spring.cloud.gcp.credentials.location` property and, instead, let the Spring Framework on Google Cloud Core Starter find the correct credentials for those environments.