chore(spring): upgrade Spring Boot to 4.0.0-RC2 and Spring Cloud to 2025.1.0-M4 (partial)#26
chore(spring): upgrade Spring Boot to 4.0.0-RC2 and Spring Cloud to 2025.1.0-M4 (partial)#26
Conversation
…025.1.0-M4 Co-authored-by: Netyyyy <92105726+Netyyyy@users.noreply.github.com>
|
@copilot APPROVE OPTION 3 WITH NOTES: Using @SuppressWarnings("deprecation") to suppress |
…nonnull annotations Co-authored-by: Netyyyy <92105726+Netyyyy@users.noreply.github.com>
Applied deprecation suppression in commit 4039c61. Added
These require code changes beyond warning suppression. Awaiting further guidance on how to proceed with these breaking API changes. |
|
@copilot do you have any solution to resolve them? (Don't need commit) |
Yes, here are solutions for both breaking changes: 1. ListenableFutureCallback Removal (spring-integration-azure-core)Issue: Spring Framework 7.0 removed Solution: Replace with Changes needed in // Replace:
private ListenableFutureCallback<Void> sendCallback;
public void setSendCallback(ListenableFutureCallback<Void> callback)
// With:
private Consumer<Throwable> sendFailureCallback;
private Consumer<Void> sendSuccessCallback;
public void setSendCallbacks(Consumer<Void> successCallback, Consumer<Throwable> failureCallback)Update usage in mono.doOnError(ex -> {
if (this.sendFailureCallback != null) {
this.sendFailureCallback.accept(ex);
}
// ...
}).doOnSuccess(t -> {
if (this.sendSuccessCallback != null) {
this.sendSuccessCallback.accept(null);
}
}).subscribe();Update 2. EntityScanner Relocation (azure-spring-data-cosmos tests)Issue: Solution: Update import statement Changes needed in test files: // Replace:
import org.springframework.boot.autoconfigure.domain.EntityScanner;
// With:
import org.springframework.boot.autoconfigure.domain.scan.EntityScanner;Affected files (8 test files):
These are minimal, surgical changes to address the API removals/relocations. |
|
@copilot I fixed the errors, continue to check build |
Build check completed. There are remaining compilation errors in the Summary of Build FailuresModule: spring-cloud-azure-autoconfigure Major Issues Identified:1. Missing/Relocated Packages (Spring Boot 4.0 reorganization)
2. API Changes
3. Code Issues
Required Actions:All import statements and API usages in the autoconfigure module need updates to match Spring Boot 4.0's new package structure and API changes. This requires systematic refactoring of ~30+ files. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot try again |
Build check completed. Status remains BUILD FAILURE with the same Spring Boot 4.0 breaking changes in Build SummaryFailed Module: spring-cloud-azure-autoconfigure Breakdown by Issue Type1. Package Relocations (6 packages)Spring Boot 4.0 reorganized autoconfigure packages:
2. API Changes (5 occurrences)
3. Bootstrap Context (2 files)
4. Code Error (1 file)
Resolution RequiredThese are fundamental Spring Boot 4.0 API changes that require manual code refactoring. The packages have been reorganized and some APIs removed/changed. This cannot be automatically fixed without understanding the new Spring Boot 4.0 API structure. |
… Service Bus connection factory (Azure#47523)
Co-authored-by: v-huizhu2 <v-huizhu2@microsoft.com>
…re#47564) Co-authored-by: Juan Ospina <70209456+jeo02@users.noreply.github.com>
* 10-01 api codegen * remove breaksentence & dictionary codes * update service methods in client * update tests * Update samples * Update test resources & add LLM test * docs, version & llm sample * update version_client * update test resources & recordings * update link * fix javadoc checks * fix typos * mark service methods * customization to remove V3_0 * avoid 'body' in params and classes * consistent fromScript/toScript naming * simplify convenience methods * fix return type per audit * clean up customization code * config to hide internal types * clean up TextTranslationClientBuilder * update docs * llm cspell fix --------- Co-authored-by: Jiarui Guo <jiarguo@microsoft.com>
Co-authored-by: Summer Warren <summerwarren@microsoft.com>
…AVS/tspconfig.yaml', API Version: 2025-09-01, SDK Release Type: stable, and CommitSHA: '8ddf0b8379d711e33e9881f8e5cc0beb044c5b42' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5665551 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. (Azure#47556)
- Incremented beta version from 2.58.0-beta.1 to 2.58.0-beta.2 - Updated changelog to reflect new beta release - Adjusted version client tracking for containerservice package
* Prepare for Spring Cloud Azure 6.1.0 release (Azure#47562) * Initial plan * Prepare for Spring Cloud Azure 6.1.0 release - update versions and CHANGELOGs Co-authored-by: Netyyyy <92105726+Netyyyy@users.noreply.github.com> * update --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * Increment versions for spring releases (Azure#47576) * Increment package versions for spring releases * Update spring-cloud-azure-dependencies version * Update pom.xml --------- Co-authored-by: Muyao Feng <92105726+Netyyyy@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
…lity tests. (Azure#47580) This commit is created by GitHub Action: https://github.com/Azure/spring-cloud-azure-tools/actions/runs/20355387385 Co-authored-by: github-actions <github-actions@github.com>
|
Hi @copilot. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Description
Upgrades Spring dependencies to Spring Boot 4.0.0-RC2 and Spring Cloud 2025.1.0-M4 (Oakwood). Both versions are officially compatible per the Spring Cloud Supported Versions matrix.
Note: This is a partial upgrade with remaining breaking changes to be addressed in
spring-cloud-azure-autoconfiguremodule.Changes Made
Dependency Updates
Build Configuration
sdk/spring/pom.xmlfor RC/M artifact resolutionversion_util.pyto parse year-based milestone versions (e.g.,2025.1.0-M4)Maintenance
spring_boot_4.0.0-RC2_managed_external_dependencies.txteng/versioning/external_dependencies.txtwith new springboot3_* dependenciesspring_boot_3.5.5_managed_external_dependencies.txtsdk/spring/CHANGELOG.mdDeprecation Warnings Suppression
Added
@SuppressWarnings("deprecation")to 86 Java files to suppress Spring Framework 7.0 deprecation warnings fororg.springframework.lang.@Nullableandorg.springframework.lang.@NonNullannotations across:Breaking Changes Addressed
ListenableFutureCallbackwithConsumercallbacks inspring-integration-azure-coremoduleorg.springframework.boot.autoconfigure.domain.EntityScannertoorg.springframework.boot.autoconfigure.domain.scan.EntityScannerin 8 test filesspring-boot-starter-data-jpadependency for persistence supportinit()method signatures to removethrows Exceptionin 3 security configurer classesBuild Status
Spring Boot 4.0 Package Relocations (~30+ files affected)
org.springframework.boot.web.client→org.springframework.boot.client.webRestTemplateBuilder(18 files)org.springframework.boot.autoconfigure.security→org.springframework.boot.autoconfigure.security.servletConditionalOnDefaultWebSecurity(3 files)org.springframework.boot.autoconfigure.data.redis→ Package structure changedRedisProperties,RedisAutoConfiguration,LettuceClientConfigurationBuilderCustomizer(3 files)org.springframework.boot.autoconfigure.kafka→ Package structure changedKafkaProperties(4 files)org.springframework.boot.autoconfigure.jdbc→ Package structure changedDataSourceProperties,DataSourceAutoConfiguration(3 files)org.springframework.boot.autoconfigure.jms→ Package structure changedSpring Security 7.0 OAuth2 API Breaking Changes
Spring Security 7.0 removed/restructured OAuth2 client classes requiring significant API refactoring:
Removed Classes (from
org.springframework.security.oauth2.client.endpoint):DefaultAuthorizationCodeTokenResponseClientDefaultRefreshTokenTokenResponseClientDefaultClientCredentialsTokenResponseClientDefaultJwtBearerTokenResponseClientAffected Files:
AadWebApplicationHttpSecurityConfigurer.javaAadB2cOidcLoginConfigurer.javaAadB2cOAuth2ClientConfiguration.javaAadOAuth2ClientConfiguration.javaAbstractOAuth2AuthorizationCodeGrantRequestEntityConverter.javaAadJwtBearerGrantRequestEntityConverter.javaRequired Actions:
These require manual refactoring to adapt to Spring Security 7.0's new OAuth2 client architecture. The Azure AD and B2C security integration code needs to be rewritten using the new Spring Security 7.0 API patterns.
Other API Changes Required
PropertyMapper.alwaysApplyingWhenNonNull()→ UsePropertyMapper.from().whenNonNull().to()pattern (4 occurrences)ConfigurableBootstrapContextrelocation (2 files)AadOAuth2UserService.javaaddParametersConverter()andaddHeadersConverter()methods removed or changedOfficial References
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.