Skip to content

Upgrading org.springframework:spring-context-support 6 to 7

Breaking6.2.19 → 7.0.10Breaking24Security18Deprecated17New196Changed263Fixed303Other155

BreakingUpgrade verdict

24 breaking changes and 18 security fixes.

  • Two web filters that read proxy forwarding headers now let you explicitly choose which header style to trust. The old constructor still works as before, but the new one is recommended.
  • A safer expression evaluation context now skips compiling expressions unless you explicitly ask for it. Compiling can be faster but removes safety checks.
  • Simplifies TransactionalOperator.executeAndAwait by removing Optional from its signature.
  • Renames maxAttempts to maxRetries in @Retryable and RetryPolicy.
Top 5 of 59 that need code or config changes

org.springframework:spring-context-support publishes an official migration guide for version 7. It covers more than the release notes do.

The official release notes and upgrade guide ↗

Installs 9 packages in all (was 8).

Breaking24
ForwardedHeaderFilter and ForwardedHeaderTransformer add a boolean constructor argument to choose standard Forwarded or X-Forwarded headers; default constructor keeps existing behavior.
ForwardedHeaderFilterForwardedHeaderTransformer
SimpleEvaluationContext no longer supports expression compilation by default; opt in via withCompilationSupported() on the builder.
SimpleEvaluationContextSpelParserConfigurationspring.expression.compiler.modewithCompilationSupported()
Simplifies TransactionalOperator.executeAndAwait by removing Optional from its signature.
TransactionalOperatorexecuteAndAwait
Renames maxAttempts to maxRetries in @Retryable and RetryPolicy.
@RetryableRetryPolicymaxAttemptsmaxRetries
Removes the Hamcrest dependency from RestTestClient.
RestTestClient
Removes support for callable references in BeanRegistrarDsl.
BeanRegistrarDsl
Removes HttpServiceClient annotation support.
HttpServiceClient
Removes maxDuration and maxElapsedTime support from RetryPolicy.
RetryPolicymaxDurationmaxElapsedTime
Removes (String, String) variants of setProperty() and withProperty() from MockEnvironment.
MockEnvironmentsetProperty()withProperty()
Removes support for Aware interfaces in BeanRegistrar.
AwareBeanRegistrar
Removes the deprecated rowsExpected property of SqlQuery.
SqlQueryrowsExpected
Removes convention-based annotation attribute override support.
Removes Netty 5 support.
Removes binary array name handling in ClassUtils.forName().
ClassUtils.forName()
Remove path mapping options marked as deprecated for removal.
ApiVersionConfigurer.setSupportedVersionPredicate() now returns void instead of ApiVersionConfigurer.
ApiVersionConfigurersetSupportedVersionPredicate()
Revises ApplicationContext#getId() nullability to non-null.
ApplicationContext#getId()
Changes canRead/canWrite overrides to Class ones in AbstractSmartHttpMessageConverter.
AbstractSmartHttpMessageConvertercanReadcanWrite
Makes RetryException#getCause non-nullable.
RetryExceptiongetCause
Refines Jackson 3 constructors to accept only JsonMapper instances for JSON.
JsonMapper
Replaces useRequestParam with useQueryParam in ApiVersionConfigurer to align with the client.
ApiVersionConfigureruseRequestParamuseQueryParam
Migrates orm.hibernate5 to the orm.jpa.hibernate package for Hibernate ORM 7.0.
orm.hibernate5orm.jpa.hibernate
Redesigns RetryPolicy to directly incorporate BackOff.
RetryPolicyBackOff
Makes built-in RetryPolicy implementations final.
RetryPolicy
Security18
Limits result size of BigDecimal/BigInteger power operations in SpEL.
BigDecimalBigInteger
Fixes CVE-2026-41838, a predictable session ID issue in the WebSocket module.
Fixes CVE-2026-41839, a privilege escalation via session fixation in WebFlux.
Fixes CVE-2026-41840, a denial of service via multipart requests in WebFlux.
Fixes CVE-2026-41841, an information disclosure via static resource cache in Spring MVC and WebFlux.
Fixes CVE-2026-41842, a denial of service via versioned resources in Spring MVC and WebFlux.
Fixes CVE-2026-41843, a path traversal via versioned static resources in Spring MVC and WebFlux.
Fixes CVE-2026-41844, an open redirect in Spring MVC and WebFlux.
Fixes CVE-2026-41845, a cross-site scripting issue via JavaScriptUtils.
JavaScriptUtils
Fixes CVE-2026-41846, a cross-site scripting issue via JSP form tags.
Fixes CVE-2026-41848, a denial of service via AntPathMatcher.
AntPathMatcher
Fixes CVE-2026-41850, an algorithmic denial of service via SpEL expressions.
Fixes CVE-2026-41851, a denial of service via an unbounded cache in SpEL.
Fixes CVE-2026-41852, arbitrary method invocation in SpEL expressions.
Fixes CVE-2026-41853, multipart request smuggling in Spring MVC and WebFlux.
Fixes CVE-2026-41854, a server-side request forgery via UriComponentsBuilder.
UriComponentsBuilder
Fixes CVE-2026-41855, unsafe deserialization via Jackson JMS converters.
Warns against unsafe static resource locations in MVC and WebFlux.
Deprecated17
Deprecates methodIdentification() in CacheAspectSupport for removal.
CacheAspectSupportmethodIdentification()
Deprecate PagedListHolder and PropertyComparator for removal.
PagedListHolderPropertyComparator
Deprecates MockMvcClientHttpRequestFactory, which is still required for tests with HTTP service interface proxy.
MockMvcClientHttpRequestFactory
Deprecates the BeanShell scripting support.
Deprecates the lang XML namespace.
lang
Deprecates Hamcrest methods in WebTestClient.
WebTestClient
Deprecates TransactionCallbackWithoutResult.
TransactionCallbackWithoutResult
Deprecates the org.springframework.web.servlet.view.document package.
org.springframework.web.servlet.view.document
Deprecates put(MergedContextConfiguration, ApplicationContext) in ContextCache.
ContextCacheput(MergedContextConfiguration, ApplicationContext)MergedContextConfigurationApplicationContext
Deprecates the DaoSupport classes.
DaoSupport
Deprecates PropertyPlaceholderConfigurer and PreferencesPlaceholderConfigurer for removal.
PropertyPlaceholderConfigurerPreferencesPlaceholderConfigurer
Deprecates JUnit 4 support in the Spring TestContext Framework.
TestContext
Deprecate PathExtensionPredicate in functional web frameworks.
PathExtensionPredicate
Deprecate mvc XML configuration namespace.
Deprecate HandlerMappingIntrospector.
HandlerMappingIntrospector
Deprecate use of PathMatcher in web modules.
PathMatcher
Deprecate use of several bean factory methods for the same bean in a configuration class.

Generated by DepDelta from published JVM bytecode. Not mixed with prose notes.

  • added: method JCacheCacheManager.resetCaches(): void
  • added: method ConfigurableMimeFileTypeMap.getContentType(Path): String
  • removed: method SimpleThreadPoolTaskExecutor.submitListenable(Callable): ListenableFuture
  • removed: method SimpleThreadPoolTaskExecutor.submitListenable(Runnable): ListenableFuture
  • changed: class SimpleThreadPoolTaskExecutor extends SimpleThreadPool implements AsyncListenableTaskExecutor, SchedulingTaskExecutor, InitializingBean, DisposableBean → class SimpleThreadPoolTaskExecutor extends SimpleThreadPool implements AsyncTaskExecutor, SchedulingTaskExecutor, InitializingBean, DisposableBean