For many years, the Spring Framework has been an innovative force in the Java ecosystem. Spring and its vast ecosystem are widely adopted, and are among the most popular Java frameworks. To do more for developers in the Spring community and meet our developers where they are, we’re announcing the Spring Cloud GCP project, a collaboration with Pivotal to better integrate Spring with Google Cloud Platform (GCP), so that running your Spring code on our platform is as easy as possible.
Spring Boot takes an opinionated view of the Spring platform and third-party libraries, making it easy to create stand-alone, production-grade Spring-based applications. With minimal configuration, Spring Boot provides your application with fully configured Java objects, getting you from nothing to a highly functional application in minutes.
By focusing on Spring Boot support, Spring Cloud GCP allows you to greatly cut down on boilerplate code and consume GCP services in a Spring-idiomatic way. In most cases, you won't even need to change your code to take advantage of GCP services.
As part of Spring Cloud GCP, we created integrations between popular Spring libraries and GCP services:
|Google Cloud Platform||Spring Framework||Description|
|Cloud SQL||Spring JDBC||Spring Cloud GCP SQL automatically configures the JDBC URLs and driver class names and helps establish secure SSL connection using client certificates.|
|Cloud Pub/Sub||Spring Integration||Use Spring Integration concepts like channels, gateways, etc. and sending/receiving messages from Cloud Pub/Sub.|
|Cloud Storage||Spring Resource||Use Spring Resource objects to access and store files in Cloud Storage buckets.|
|Stackdriver Trace||Spring Cloud Sleuth||Use Spring Cloud Sleuth and its annotations to trace your microservices and send the trace data to Stackdriver Trace for storage and analysis.|
|Runtime Configuration API||Spring Cloud Config||Store and access configuration values in managed Runtime Configuration service without running your own config server.|
From Milestone 2, all the above integrations are compatible with the latest Spring Framework 5 and Spring Boot 2.
The Spring Cloud GCP libraries are in Beta stage and are available from Pivotal’s Milestones Maven Repository.
To get started, check out the code samples, reference documentation, the Spring Cloud GCP project page and the Spring Cloud code labs! More resources are available on the GCP Spring documentation. We would also love to hear from you at our GitHub issue tracker.
We’re working on other exciting integrations and planning for general availability soon. So stay tuned for more news!