Skip to content

Upgrading org.springframework:spring-aop 6 to 7

Breaking6.2.19 → 7.0.10Breaking22Security18Deprecated17New198Changed268Fixed298Other155

BreakingUpgrade verdict

22 breaking changes and 18 security fixes.

  • A safer expression evaluation context now skips compiling expressions unless you explicitly ask for it.
  • Simplifies TransactionalOperator.executeAndAwait by removing Optional from its signature.
  • Renames maxAttempts to maxRetries in @Retryable and RetryPolicy.
  • RestTestClient no longer bundles Hamcrest, so code relying on it must add its own dependency.
Top 5 of 57 that need code or config changes

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

The official release notes and upgrade guide ↗

Installs 4 packages in all (was 3).

Breaking22
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.
TransactionalOperatorexecuteAndAwaitOptional
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 the (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.
Netty 5
Removes binary array name handling in ClassUtils.forName().
ClassUtils.forName()
Remove path mapping options marked as deprecated for removal.
Changes ApiVersionConfigurer.setSupportedVersionPredicate() to return void instead of ApiVersionConfigurer.
ApiVersionConfigurersetSupportedVersionPredicate()
Revises ApplicationContext#getId() nullability to non-null.
ApplicationContext#getId()
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, an 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()
Deprecates PagedListHolder and PropertyComparator for removal.
PagedListHolderPropertyComparator
Notes that deprecated MockMvcClientHttpRequestFactory is 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.

  • removed: field ProxyFactoryBean.logger: Log
  • added: method ProxyConfig.copyDefault(ProxyConfig): void
  • added: static method AopProxyUtils.ultimateSingletonTarget(Object): Object
  • removed: method AbstractAutoProxyCreator.isFrozen(): boolean
  • removed: method AbstractAutoProxyCreator.setFrozen(boolean): void
  • added: field AbstractBeanFactoryAwareAdvisingPostProcessor.beanFactory: ConfigurableListableBeanFactory
  • added: static field AutoProxyUtils.ALL_INTERFACES_ATTRIBUTE_VALUE: Object
  • added: static field AutoProxyUtils.DEFAULT_PROXY_CONFIG_BEAN_NAME: String
  • added: static field AutoProxyUtils.EXPOSED_INTERFACES_ATTRIBUTE: String
  • added: ctor ConcurrencyThrottleInterceptor(int)