Spring Cloud GCP is a set of integrations between Spring Framework and Google Cloud Platform. It makes it much easier for Spring framework users to run their applications on Google Cloud Platform.
This document provides a high-level overview of the changes introduced in Spring Cloud GCP by release. For a detailed view of what has changed, refer to the commit history on GitHub.
-
Fixed: bean factory propagation in consumer binding (#515).
-
Removed workaround in
PubSubInboundChannelAdapter
ensuring error propagation during application shutdown. This should be a no-op to users, as Spring Integration starting with v5.4.3 and Spring Cloud Stream starting with v3.1.1 userequireSubscribers=true
on the default error channels, causing any errors reaching error channels with no subscribers to propagate an exception. -
Added IDE discovery for
management.health.pubsub.enabled
property (#543)
-
Fixed:
ByteString
value conversion compatibility with Spring Boot 2.5.x (#496).
Thanks to our community contributors, @artemptushkin, @garywg04 and @alos!
-
Upgraded to GCP Libraries BOM 20.6.0
-
Added version management for
com.google.cloud.sql:jdbc-socket-factory-core
(#466)
-
Exposed publisher endpoint for message ordering (#421)
-
Pub/Sub Health Indicator timeout increased to 2 seconds (#420).
-
Gated Cloud Pub/Sub emulator autoconfiguration Pub/Sub module being present and enabled (#446)
-
PubSubMessageHandler
now passes the original message to new success/failure callbacks, allowing applications to track message publish status (#482). The oldPubSubMessageHandler.setPublishCallback()
method is now deprecated.
-
Upgraded to Spring Cloud 2020.0.2 and Spring Boot 2.4.4
-
Upgraded to Google Cloud Libraries BOM 19.2.1
-
Added Java 16 support (#391)
-
Various code quality improvements with the help of SonarCloud.
-
Disabled
CloudSqlEnvironmentPostProcessor
in bootstrap context (#273)-
This enables the use of Secrets Manager property placeholders together with Cloud SQL configuration.
-
-
Fixed a bug in the
BigQueryFileMessageHandler
where it referenced the wrong variable in the setter (#270)
-
Modified
Firestore.withParent()
to acceptString
instead ofObject
(#315)
-
Fixed the JSON layout logging levels mapping (#314)
-
In Cloud Stream Pub/Sub Binder, added support for specifying a custom subscription as a consumer endpoint (#262)
-
Added
PubSubAdmin.createSubscription(Subscription.Builder)
to allow access to all subscription properties (#343) -
Added warnings about the use of
returnImmediately=true
(#354) -
Added Cloud Stream Dead Letter Topic support (#358)
-
Added support for custom subscription name for Pub/Sub health check (#330)
-
Added support for message ordering when publishing (#408)
-
Introduced
spring.cloud.gcp.pubsub.publisher.enable-message-ordering
andGcpPubSubHeaders.ORDERING_KEY
header
-
-
Fixed:
PathResourceResolver
can’t resolve aGoogleStorageResource
due to no Google StorageUrlStreamHandler
(#210)
-
Upgraded to Spring Cloud 2020.0.1 and Spring Boot 2.4.2 (#233)
-
Multiple code quality improvements with help from SonarCloud
-
Fixed: Firestore emulator not using configured project id (#211)
-
Fixed: Spring Cloud Stream unable to setup subscription to a topic in a different GCP project (#232)
-
Fixed session leak with aborted read/write transactions (#251)
-
Compatible with Spring Cloud
2020.0.0
(Ilford release train) -
Package renamed from
org.springframework.cloud.gcp
tocom.google.cloud.spring
-
Maven coordinates now use
com.google.cloud
as the group ID -
All
deprecated
items removed
For a full list, please see the 2.x migration guide.
-
Replaced
CloudSqlAutoConfiguration
withCloudSqlEnvironmentPostProcessor
(#131)
-
Added Cloud Key Management Service (KMS) support (#175)
-
Spring Boot starter, sample, and documentation included
-
-
Added support for trace with async logging (#197)
-
Multiple fixes for the metrics auto-config and sample (#121)
-
Addded support for binder customizers (#186)
-
Changed secret manager module to use v1 instead of v1beta (#173)
-
Added support
spring.cloud.gcp.project-id
property for Spanner Emulator config (#123)
-
Fixed Pub/Sub emulator
ManagedChannel
shutdown (#2583)
-
Differentiate between Publisher and Subscriber
TransportChannelProvider
(#2520)-
If you’ve been overwriting the auto-configured
transportChannelProvider
bean for Pub/Sub, you will need to rename it to{"subscriberTransportChannelProvider", "publisherTransportChannelProvider"}
.
-
-
Better generics for ack operations in
PubSubSubscriberOperations
(#2539)-
This a minor breaking change if you have a custom implementation of
PubSubSubscriberOperations
.
-
-
Fixed: With MessageHistory enabled, sending a Pub/Sub message and consuming it in a subscription fails due to
IllegalArgumentException
(#2562)
-
Added NUMERIC data type support for Spanner (BigDecimal) (#2515)
-
Upgraded GCP libraries BOM and other dependencies (#2477)
-
New Spring Cloud GCP starter,
spring-cloud-gcp-starter-metrics
, configures Micrometer Stackdriver to automatically pick up project ID and credentials (thanks to @eddumelendez). -
Added Metrics Sample App (#2455)
-
Allow
projectId
override in Firebase Authentication (#2405)
-
Added additional operations for managing secret versions with
SecretManagerTemplate
(thanks to @kioie)
-
Added the
spring.cloud.gcp.storage.project-id
autoconfig property (#2440) -
Additional GCS Spring Integration file filters
GcsAcceptModifiedAfterFileListFilter
andGcsDiscardRecentModifiedFileListFilter
(thanks to @hosainnet)
Note
|
As we upgraded to the latest version of google-cloud-logging-logback , we picked up a breaking change where the log entry payload is now written in JSON rather than plain text.
So, if you’re reading log entries back from Cloud Logging using LogEntry.getPayload() , make sure to cast the returned payload object to JsonPayload instead of StringPayload .
|
Note
|
This version introduced several breaking changes to Secret Manager property source. Please see the reference documentation for the new way for accessing secrets as properties. |
-
Support Extra Propagation Fields with Trace (#2290)
-
Allow users to provide the ImageContext in CloudVisionTemplate (#2286)
-
Make Firebase Security Autoconfiguration conditional (#2258) Thank you to the contributors from our user community: @eddumelendez, @mzeijen, @s13o, @acet, @guillaumeblaquiere
-
Support lazy loading entities using @LazyReference (#2104)
-
Made existsById more efficient by retrieving only the key field (#2127)
-
Projections now work with the Slice return type (#2133) and GQL queries (#2139) in repositories
-
Improved repository method name validation (#2155)
-
Fixed delete for void repository method return type (#2169)
-
Introduced Firebase Authentication module (#2111)
-
Added IN support in name-based queries (#2054)
-
Hid trace scheduler from Spring Sleuth (#2158)
-
New module
-
Autoconfiguration for the BigQuery client objects with credentials needed to interface with BigQuery
-
A Spring Integration message handler for loading data into BigQuery tables in your Spring integration pipelines
-
Datastore emulator support and auto-configuration
-
Entity Inheritance Hierarchies support
-
Query by example
-
Support Pagination for @Query annotated methods
-
Support key fields in name-based query methods
-
Events and Auditing support
-
Support for multiple namespaces
-
Spring Boot Actuator Support for Datastore Health Indicator (#1423)
-
PubsubTemplate publish to topics in other projects (#1678)
-
PubsubTemplate subscribe in other projects (#1880)
-
Reactive support for Pub/Sub subscription (#1461)
-
Spring Integration - Pollable Message Source (using Pub/Sub Synchronous Pull) (#1321)
-
Pubsub stream binder via synchronous pull (#1419)
-
Add keepalive property to pubsub; set default at 5 minutes (#1807)
-
Change thread pools to create daemon threads that do not prevent JVM shutdown (#2010)
-
This is a change in behavior for non-web applications that subscribe to a Cloud Pub/Sub topic. The subscription threads used to keep the application alive, but will now allow the application to shut down if no other work needs to be done.
-
-
Added original message to the throwable for Pub/Sub publish failures (#2020)
-
Added support to allow multiple IAP audience claims (#1856)
-
Expose Spanner failIfPoolExhausted property (#1889)
-
Lazy fetch support for interleaved collections (#1460)
-
Bounded staleness option support (#1727)
-
Spring Data Spanner Repositories
In
clause queries support (#1701) -
Spanner array param binding
-
Events and Auditing support
-
Multi-Instance support (#1530)
-
Fixed conversion for timestamps older than unix epoch (#2043)
-
Fixed REST Repositories PUT by populating key fields when virtual key property is set (#2053)
-
Spring Cloud Config and Bus over Pub/Sub sample/docs (#1550)