-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Spring Cloud 2024.0 and Spring Boot 3.4.1 (#3411)
* chore: test Spring Cloud 2024 upgrade * fix datastore tests * fix kotlin sample test * fix spanner autoconfig * use latest spring-cloud-config in pubsub bus sample * wip pubsub stream binder test * update spring boot to 3.4.0 * adapt data-spanner to spring boot 3.4 * fix value evaluation for SqlSpannerQuery * use value expression delegate in datastore * restore unnecessary changes * fix datastore tests * format * Revert "format" This reverts commit 290c7a2. * fix style violations * remove unused imports * remove unused imports in autoconfigure * fix imports in pubsub emulator * fix gql datastore query test * remove spring boot 3.2 compatibility check * remove config module * remove unused module * fix secretmanager sample * fix whitespace in it * add native config for alloydb sample * update libraries bom * remove unused method in pubsub * fix 2sa usage * fix spanner units * fix units in pubsub * try new native config * use custom placeholder configurer in secretmanager * fix style in secretmanager * use static bean * add default value for secret manager sample config file * configure netty for firestore sample * fix netty usage for native image building in pubsub sample * fix native tests for data-firestore This approach avoids using @Autowired given its close-world assumption. We instead rely on @value to resolve for the database-id property in the now fixed integration test. * fix storage sample test This uses the same approach as of data-firestore: we will not rely on autowired constructors * restore secret manager to latest of `main` We will wait for https://github.com/spring-projects/spring-framework/milestone/388 to be finished. This will translate into spring-framework:6.2.2 that will fix the regression disallowing normal use of `${sm://secret}` placeholders. * fix pubsub binder units this fix changes the way the extended properties bean is injected into the tests. With the upgrade, the bean is no w detected as two beans, producing a collision. In this new way we declare a user configuration with a custom bean. * add recommended netty config for postgress samples * fix pubsub binder tests We set a base configuration bean with mock credentials, project ID provider and extended properties * upgrade to spring-boot 3.4.1 * remove placeholder configurer from secret manager * restore datastore autoconfig this had an unintended/unnecessary change * restore graalvm config in main pom.xml This change was unnecessary * remove unused import in stream binder * cleanup of pubsub binder tests * use spring boot 3.4.1 in samples * remove native config for alloydb sample * remove unused whitespace in poms * Revert "fix storage sample test" This reverts commit dd81242. * try using unchanged firestore IT config * Revert "fix pubsub binder tests" This reverts commit 7b82400. * Reapply "fix pubsub binder tests" This reverts commit be28c72. * test reverting changes in pubsub binder * Revert "test reverting changes in pubsub binder" This reverts commit 4eae5e7. * add support for value expressions and query method evaluators in datastore * test both value expressions and query method expressions in datastore * fix style * fix style ii * introduce support for value expression delegate and query method evaluation context in spanner * adapt spanner tests * standardize to parameterized booleans * add support info on root readme * add spring cloud 2024 support info in gettin-started * introduce 5.x to 6.x migration guide * update project.version to 6.0.0-SNAPSHOT * Revert "remove config module" This reverts commit 66b4439. * update project.version in config integrations * update versions.txt * update project.version in spring-cloud-generator * retrigger tests * fix checkstyle violations in spanner * fix checkstyle violations in datastore * update valkey to 6.x * fix checkstyle in data-spanner * replace golden copyright year * Revert "update valkey to 6.x" This reverts commit eaf04dc. * Revert "update project.version in spring-cloud-generator" This reverts commit 0fabdbf. * Revert "update versions.txt" This reverts commit 3eeef1e. * Revert "update project.version in config integrations" This reverts commit ce40125. * Revert "update project.version to 6.0.0-SNAPSHOT" This reverts commit 4015f3f. * update secretmanager sample * update secret manager to support sm@ and sm:// syntax * add parameterized tests for sm:// and sm@ in secretmanager * adapt secret manager autoconfig tests to new prefix * abort full string attempt in secret manager this prevents attempts of the form sm@my_secret:default as a whole string * consider sm:// when exiting on full string match attempts * finish sample code * add functional interface annotation to PrefixMatcher * make secret manager dependency non-optional in autoconfigure module * cleanup * fix refresh scope for secretmanager sample This moves the @RefreshScope annotation to method-level in order to avoid build failures in the native image tests. A good candidate to prove it as good practice is https://github.com/spring-cloud/spring-cloud-commons/blob/c0f3a6190c5e636ac5391371b503f7f1e6e24a8e/docs/modules/ROOT/pages/spring-cloud-commons/application-context-services.adoc?plain=1#L211-L215 The native tests script will also override the refresh scope as it's explained in the docs (see implementation for link). * update spring-boot to 3.4.2
- Loading branch information
1 parent
c637e38
commit a72a86b
Showing
35 changed files
with
1,180 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
== Migration Guide from Spring Cloud GCP 5.x to 6.x | ||
=== Before you start | ||
==== Upgrade to the 5.x version | ||
This doc assumes you are running with Spring Cloud GCP 5.x. | ||
|
||
If you are currently running with an earlier major version of Spring Cloud GCP, i.e., 1.x or 2.x, we recommend that you upgrade to [Spring Cloud GCP 5.x] before migrating to Spring Cloud GCP 6.x. | ||
|
||
* link:migration-guide-1.x.adoc[Migration guide from Spring Cloud GCP 1.x to 2.x] | ||
* link:migration-guide-3.x.adoc[Migration guide from Spring Cloud GCP 3.x to 4.x] | ||
|
||
Note that since Spring Cloud GCP 5.0 has few breaking changes, we have only provided release notes | ||
as reference. | ||
|
||
==== Review System requirements | ||
Spring Cloud GCP 6.0 is built on Spring Boot 3.4.x and Spring Framework 6.2.x, which requires Java 17 at minimum. | ||
If you are currently on Java 8 or Java 11, you need to upgrade your JDK before you can develop an application based on Spring Cloud GCP 6.0. | ||
|
||
=== Upgrade to Spring Cloud GCP 6.0 | ||
==== Update Bill of Materials (BOM) | ||
If you’re a Maven user, add our BOM to your pom.xml `<dependencyManagement>` section. | ||
This will allow you to not specify versions for any of the Maven dependencies and instead delegate versioning to the BOM. | ||
|
||
[source, xml] | ||
---- | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.cloud</groupId> | ||
<artifactId>spring-cloud-gcp-dependencies</artifactId> | ||
<version>6.0.0</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
---- | ||
|
||
===== Review Dependencies | ||
Run `mvn dependency:tree` (`gradlew dependencies` for Gradle projects) to see the dependency tree of your project. | ||
Ensure Spring-related dependencies have matching versions: | ||
|
||
* Spring Boot 3.4.x | ||
* Spring Cloud 2024.x | ||
** For detailed dependency versions, see "2024.0 (Moorgate)" column in link:https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions#supported-releases[Spring Cloud: Supported Versions] table. | ||
|
||
==== Secret Manager | ||
Introduced support for the `${sm@secret_id}` syntax. This new syntax is encouraged over the (still | ||
supported) `${sm://secret_id}` syntax. Users still relying on the `sm://` syntax will be issued a | ||
warning. | ||
|
||
For example: | ||
[source, java] | ||
@Value("${sm@my_secret}") | ||
String mySecret; | ||
--- | ||
|
||
==== Datastore | ||
Introduced support for `ValueExpressionDelegate`. This class is suggested over | ||
`QueryMethodEvaluationContextProvider`. | ||
|
||
==== Spanner | ||
Introduced support for `ValueExpressionDelegate`. This class is suggested over | ||
`QueryMethodEvaluationContextProvider`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.