Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Spring CodeGen): switch to Spring boot 2.7 style in registering auto-configurations #1044

Merged
merged 3 commits into from
Oct 3, 2022

Conversation

zhumin8
Copy link
Contributor

@zhumin8 zhumin8 commented Sep 26, 2022

Spring Boot 2.7 has introduced changes to how auto-configurations are registered. Both changes are backward compatible, but the older spring.factories style will be removed in Spring Boot 3.0.
Also consider that Spring Boot 2.6.x goes out of support by 11-24-2022, switching this code to 2.7's new style.

@zhumin8 zhumin8 changed the title fix: switch to Spring boot 2.7 style in registering auto-configurations fix(Spring CodeGen): switch to Spring boot 2.7 style in registering auto-configurations Sep 27, 2022
@zhumin8 zhumin8 added the spring pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch. label Sep 29, 2022
@@ -139,13 +139,14 @@ private static void writeMetadataFile(GapicContext context, String path, JarOutp
}

private static void writeSpringFactories(GapicContext context, JarOutputStream jos) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this mean we need to rebrand this method and the exception message as well? (To something like writeAutoConfigRegistration)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah-ha! Good catch.

@zhumin8 zhumin8 marked this pull request as ready for review September 30, 2022 22:46
@zhumin8 zhumin8 requested review from a team as code owners September 30, 2022 22:46
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

44.4% 44.4% Coverage
0.0% 0.0% Duplication

@zhumin8 zhumin8 merged commit ada6e92 into autoconfig-gen-draft2 Oct 3, 2022
@zhumin8 zhumin8 deleted the spring-boot-2.7-style branch October 3, 2022 17:00
diegomarquezp pushed a commit that referenced this pull request Oct 22, 2022
…uto-configurations (#1044)

Spring Boot 2.7 has introduced [changes to how auto-configurations](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#changes-to-auto-configuration) are registered. Both changes are backward compatible, but the older `spring.factories` style [will be removed in Spring Boot 3.0](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M5-Release-Notes#auto-configuration-registration). 
Also consider that Spring Boot 2.6.x goes out of support by 11-24-2022, switching this code to 2.7's new style.
suztomo pushed a commit that referenced this pull request Mar 21, 2023
chore: upgrade native image checks to graalvm-22.3.0
Source-Link: googleapis/synthtool@5e52896
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:27b1b1884dce60460d7521b23c2a73376cba90c0ef3d9f0d32e4bdb786959cfd

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spring pr that's related to spring code gen, intend to merge into autoconfig-gen-draft2 branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants