Upgrading org.springframework:spring-aop 6 to 7
Breaking6.2.19 → 7.0.10Breaking22Security18Deprecated17New198Changed268Fixed298Other155
BreakingUpgrade verdict
22 breaking changes and 18 security fixes.
In plain terms
- 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.
Must act 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).
What you must change
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.
TransactionalOperatorexecuteAndAwaitOptionalRenames maxAttempts to maxRetries in @Retryable and RetryPolicy.
@RetryableRetryPolicymaxAttemptsmaxRetriesRemoves the Hamcrest dependency from RestTestClient.
RestTestClientRemoves support for callable references in
BeanRegistrarDsl.BeanRegistrarDslRemoves HttpServiceClient annotation support.
HttpServiceClientRemoves maxDuration and maxElapsedTime support from RetryPolicy.
RetryPolicymaxDurationmaxElapsedTimeRemoves the (String, String) variants of setProperty() and withProperty() from MockEnvironment.
MockEnvironmentsetProperty()withProperty()Removes support for Aware interfaces in BeanRegistrar.
AwareBeanRegistrarRemoves the deprecated rowsExpected property of SqlQuery.
SqlQueryrowsExpectedRemoves convention-based annotation attribute override support.
Removes Netty 5 support.
Netty 5Removes 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.
RetryExceptiongetCauseRefines Jackson 3 constructors to accept only JsonMapper instances for JSON.
JsonMapperReplaces
useRequestParam with useQueryParam in ApiVersionConfigurer to align with the client.ApiVersionConfigureruseRequestParamuseQueryParamMigrates orm.hibernate5 to the orm.jpa.hibernate package for Hibernate ORM 7.0.
orm.hibernate5orm.jpa.hibernateRedesigns RetryPolicy to directly incorporate BackOff.
RetryPolicyBackOffMakes built-in RetryPolicy implementations final.
RetryPolicySecurity18
Limits result size of BigDecimal/BigInteger power operations in SpEL.
BigDecimalBigIntegerFixes 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.
JavaScriptUtilsFixes CVE-2026-41846, a cross-site scripting issue via JSP form tags.
Fixes CVE-2026-41848, a denial of service via AntPathMatcher.
AntPathMatcherFixes 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.
UriComponentsBuilderFixes CVE-2026-41855, unsafe deserialization via Jackson JMS converters.
Warns against unsafe static resource locations in MVC and WebFlux.
Deprecations to plan for
Deprecated17
Deprecates methodIdentification() in CacheAspectSupport for removal.
CacheAspectSupportmethodIdentification()Deprecates PagedListHolder and PropertyComparator for removal.
PagedListHolderPropertyComparatorNotes that deprecated MockMvcClientHttpRequestFactory is required for tests with HTTP service interface proxy.
MockMvcClientHttpRequestFactoryDeprecates the BeanShell scripting support.
Deprecates the
lang XML namespace.langDeprecates Hamcrest methods in WebTestClient.
WebTestClientDeprecates TransactionCallbackWithoutResult.
TransactionCallbackWithoutResultDeprecates the org.springframework.web.servlet.view.document package.
org.springframework.web.servlet.view.documentDeprecates put(MergedContextConfiguration, ApplicationContext) in ContextCache.
ContextCacheput(MergedContextConfiguration, ApplicationContext)MergedContextConfigurationApplicationContextDeprecates the DaoSupport classes.
DaoSupportDeprecates PropertyPlaceholderConfigurer and PreferencesPlaceholderConfigurer for removal.
PropertyPlaceholderConfigurerPreferencesPlaceholderConfigurerDeprecates JUnit 4 support in the Spring TestContext Framework.
TestContextDeprecate PathExtensionPredicate in functional web frameworks.
PathExtensionPredicateDeprecate mvc XML configuration namespace.
Deprecate HandlerMappingIntrospector.
HandlerMappingIntrospectorDeprecate use of PathMatcher in web modules.
PathMatcherDeprecate use of several bean factory methods for the same bean in a configuration class.
API changes
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)