Skip navigation links
Spring Framework
  • Overview
  • Package
  • Class
  • Use
  • Tree
  • Deprecated
  • Index
  • Help

Deprecated API

Contents

  • Terminally Deprecated
  • Interfaces
  • Classes
  • Exceptions
  • Annotation Interfaces
  • Fields
  • Methods
  • Constructors
  • Enum Constants
  • Annotation Interface Elements
  • Terminally Deprecated Elements
    Element
    Description
    org.springframework.aot.agent.RuntimeHintsAgent
    as of 7.0 in favor of the -XX:MissingRegistrationReportingMode=Warn and -XX:MissingRegistrationReportingMode=Exit JVM flags with GraalVM.
    org.springframework.aot.hint.ExecutableMode.INTROSPECT
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.DECLARED_CLASSES
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.DECLARED_FIELDS
    in favor of MemberCategory.ACCESS_DECLARED_FIELDS with similar semantics.
    org.springframework.aot.hint.MemberCategory.INTROSPECT_DECLARED_CONSTRUCTORS
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.INTROSPECT_DECLARED_METHODS
    with no replacement since introspection is added by default when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.INTROSPECT_PUBLIC_CONSTRUCTORS
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.INTROSPECT_PUBLIC_METHODS
    with no replacement since introspection is added by default when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.PUBLIC_CLASSES
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.PUBLIC_FIELDS
    in favor of MemberCategory.ACCESS_PUBLIC_FIELDS with similar semantics.
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.ConstructorHintPredicate
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.ExecutableHintPredicate
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.FieldHintPredicate
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.MethodHintPredicate
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onConstructor(Constructor<?>)
    since 7.0 in favor of ReflectionHintsPredicates.onConstructorInvocation(Constructor) or ReflectionHintsPredicates.onType(Class).
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onField(Class<?>, String)
    since 7.0 in favor of ReflectionHintsPredicates.onFieldAccess(Class, String) with similar semantics.
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onField(Field)
    since 7.0 in favor of ReflectionHintsPredicates.onFieldAccess(Field) with similar semantics.
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onField(String, String)
    since 7.0 in favor of ReflectionHintsPredicates.onFieldAccess(String, String) with similar semantics.
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onMethod(Class<?>, String)
    since 7.0 in favor of ReflectionHintsPredicates.onMethodInvocation(Class, String) or ReflectionHintsPredicates.onType(Class).
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onMethod(Method)
    since 7.0 in favor of ReflectionHintsPredicates.onMethodInvocation(Method) or ReflectionHintsPredicates.onType(Class).
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onMethod(String, String)
    since 7.0 in favor of ReflectionHintsPredicates.onMethodInvocation(String, String) or ReflectionHintsPredicates.onType(Class).
    org.springframework.aot.hint.support.FilePatternResourceHintsRegistrar.Builder.withClasspathLocations(String...)
    in favor of FilePatternResourceHintsRegistrar.Builder.withClassPathLocations(String...)
    org.springframework.aot.hint.support.FilePatternResourceHintsRegistrar.Builder.withClasspathLocations(List<String>)
    in favor of FilePatternResourceHintsRegistrar.Builder.withClassPathLocations(List)
    org.springframework.aot.test.agent.RuntimeHintsRecorder
    as of 7.0 in favor of the -XX:MissingRegistrationReportingMode=Warn and -XX:MissingRegistrationReportingMode=Exit JVM flags with GraalVM.
    org.springframework.context.index.CandidateComponentsIndex
    as of 6.1, in favor of the AOT engine.
    org.springframework.context.index.CandidateComponentsIndexLoader
    as of 6.1, in favor of the AOT engine.
    org.springframework.context.index.processor.CandidateComponentsIndexer
    as of 6.1, in favor of the AOT engine.
    org.springframework.core.io.PathResource
    since 7.0 in favor of FileSystemResource
    org.springframework.http.HttpEntity(T, MultiValueMap<String, String>)
    in favor of HttpEntity(Object, HttpHeaders)
    org.springframework.http.HttpEntity(MultiValueMap<String, String>)
    in favor of HttpEntity(HttpHeaders)
    org.springframework.http.HttpHeaders.asMultiValueMap()
    This method is provided for backward compatibility with APIs that would only accept maps. Generally avoid using HttpHeaders as a Map or MultiValueMap.
    org.springframework.http.HttpHeaders.asSingleValueMap()
    in favor of HttpHeaders.toSingleValueMap() which performs a copy but ensures that collection-iterating methods like entrySet() are case-insensitive
    org.springframework.http.RequestEntity(T, MultiValueMap<String, String>, HttpMethod, URI, Type)
    in favor of RequestEntity(Object, HttpHeaders, HttpMethod, URI, Type)
    org.springframework.http.RequestEntity(T, MultiValueMap<String, String>, HttpMethod, URI)
    in favor of RequestEntity(Object, HttpHeaders, HttpMethod, URI)
    org.springframework.http.RequestEntity(MultiValueMap<String, String>, HttpMethod, URI)
    in favor of RequestEntity(HttpHeaders, HttpMethod, URI)
    org.springframework.http.ResponseEntity(T, MultiValueMap<String, String>, int)
    in favor of ResponseEntity(Object, HttpHeaders, int)
    org.springframework.http.ResponseEntity(T, MultiValueMap<String, String>, HttpStatusCode)
    in favor of ResponseEntity(Object, HttpHeaders, HttpStatusCode)
    org.springframework.http.ResponseEntity(MultiValueMap<String, String>, HttpStatusCode)
    in favor of ResponseEntity(HttpHeaders, HttpStatusCode)
    org.springframework.test.util.JsonPathExpectationsHelper(String, Object...)
    in favor of calling String.formatted(Object...) upfront
    org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder.setRemoveSemicolonContent(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setAlwaysUseFullPath(boolean)
    as of 5.3 in favor of using UrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please see UrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setRemoveSemicolonContent(boolean)
    as of 5.3 in favor of using UrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please see UrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setUrlDecode(boolean)
    as of 5.3 in favor of using UrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please see UrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.reactive.function.server.RequestPredicates.pathExtension(String)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.reactive.function.server.RequestPredicates.pathExtension(Predicate<String>)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.reactive.function.server.RequestPredicates.Visitor.pathExtension(String)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.servlet.config.annotation.InterceptorRegistration.pathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.getPathMatcher()
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.getPathMatcherOrDefault()
    use of PathMatcher is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.getUrlPathHelper()
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.getUrlPathHelperOrDefault()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.preferPathMatcher()
    use of PathMatcher is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.setPathMatcher(PathMatcher)
    use of PathMatcher is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry(ApplicationContext, ServletContext, ContentNegotiationManager, UrlPathHelper)
    in favor of ResourceHandlerRegistry(ApplicationContext, ServletContext, ContentNegotiationManager)
    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.mvcPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.mvcUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.function.RequestPredicates.pathExtension(String)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.servlet.function.RequestPredicates.pathExtension(Predicate<String>)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.servlet.function.RequestPredicates.Visitor.pathExtension(String)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.servlet.function.support.RouterFunctionMapping.match(HttpServletRequest, String)
    org.springframework.web.servlet.handler.AbstractHandlerMapping.getPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.AbstractHandlerMapping.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.AbstractHandlerMapping.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.AbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.match(HttpServletRequest, String)
    org.springframework.web.servlet.handler.HandlerMappingIntrospector
    in favor of using just PathPatternParser; when HandlerMappingIntrospector.allHandlerMappingsUsePathPatternParser() returns true, it is sufficient to use that to align with handler mappings.
    org.springframework.web.servlet.handler.MappedInterceptor.getPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.MappedInterceptor.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.MatchableHandlerMapping
    together with HandlerMappingIntrospector without a replacement.
    org.springframework.web.servlet.handler.MatchableHandlerMapping.match(HttpServletRequest, String)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.RequestMatchResult
    together with HandlerMappingIntrospector without a replacement.
    org.springframework.web.servlet.handler.RequestMatchResult(String, String, PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.setAlwaysUseFullPath(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.setRemoveSemicolonContent(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.setUrlDecode(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.condition.PatternsRequestCondition
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.match(HttpServletRequest, String)
    org.springframework.web.servlet.mvc.method.annotation.ServletCookieValueMethodArgumentResolver.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration.getPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.RequestMappingInfo.getPatternsCondition()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.WebContentInterceptor.lookupCacheControl(String)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.WebContentInterceptor.lookupCacheSeconds(String)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.WebContentInterceptor.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.PathResourceResolver.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.PathResourceResolver.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.ResourceHttpRequestHandler.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.ResourceHttpRequestHandler.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.ResourceUrlProvider.getPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.
    org.springframework.web.servlet.resource.ResourceUrlProvider.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.
    org.springframework.web.servlet.resource.ResourceUrlProvider.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.
    org.springframework.web.servlet.resource.ResourceUrlProvider.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.
    org.springframework.web.servlet.support.AbstractFlashMapManager.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.support.AbstractFlashMapManager.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.support.RequestContext.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.support.RequestContext.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry.getUrlPathHelper()
    org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.socket.config.annotation.StompEndpointRegistry.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry.getUrlPathHelper()
    org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
  • Deprecated Interfaces
    Interface
    Description
    org.springframework.jdbc.support.lob.LobCreator
    as of 6.2, in favor of SqlBinaryValue and SqlCharacterValue
    org.springframework.jdbc.support.lob.LobHandler
    as of 6.2, in favor of SqlBinaryValue and SqlCharacterValue
    org.springframework.jdbc.support.xml.SqlXmlHandler
    as of 6.2, in favor of direct ResultSet.getSQLXML(int) and Connection.createSQLXML() usage, possibly in combination with a custom SqlValue implementation
    org.springframework.jdbc.support.xml.SqlXmlValue
    as of 6.2, in favor of a direct SqlValue implementation
    org.springframework.jdbc.support.xml.XmlBinaryStreamProvider
    as of 6.2, in favor of direct SQLXML usage
    org.springframework.jdbc.support.xml.XmlCharacterStreamProvider
    as of 6.2, in favor of direct SQLXML usage
    org.springframework.jdbc.support.xml.XmlResultProvider
    as of 6.2, in favor of direct SQLXML usage
    org.springframework.web.servlet.handler.MatchableHandlerMapping
    together with HandlerMappingIntrospector without a replacement.
  • Deprecated Classes
    Class
    Description
    org.springframework.aot.agent.InstrumentedBridgeMethods
    This class should only be used by the runtime-hints agent when instrumenting bytecode and is not considered public API.
    org.springframework.aot.agent.RuntimeHintsAgent
    as of 7.0 in favor of the -XX:MissingRegistrationReportingMode=Warn and -XX:MissingRegistrationReportingMode=Exit JVM flags with GraalVM.
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.ConstructorHintPredicate
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.ExecutableHintPredicate
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.FieldHintPredicate
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.MethodHintPredicate
    org.springframework.aot.test.agent.RuntimeHintsRecorder
    as of 7.0 in favor of the -XX:MissingRegistrationReportingMode=Warn and -XX:MissingRegistrationReportingMode=Exit JVM flags with GraalVM.
    org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer
    as of 5.2, along with PropertyPlaceholderConfigurer
    org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
    as of 5.2; use org.springframework.context.support.PropertySourcesPlaceholderConfigurer instead which is more flexible through taking advantage of the Environment and PropertySource mechanisms.
    org.springframework.beans.factory.support.PropertiesBeanDefinitionReader
    as of 5.3, in favor of Spring's common bean definition formats and/or custom reader implementations
    org.springframework.cache.annotation.CachingConfigurerSupport
    as of 6.0 in favor of implementing CachingConfigurer directly
    org.springframework.cache.jcache.config.JCacheConfigurerSupport
    as of 6.0 in favor of implementing JCacheConfigurer directly
    org.springframework.cglib.core.TinyBitSet
    org.springframework.context.index.CandidateComponentsIndex
    as of 6.1, in favor of the AOT engine.
    org.springframework.context.index.CandidateComponentsIndexLoader
    as of 6.1, in favor of the AOT engine.
    org.springframework.context.index.processor.CandidateComponentsIndexer
    as of 6.1, in favor of the AOT engine.
    org.springframework.core.Constants
    since 6.1 with no replacement; use an enum, map, or similar custom solution instead
    org.springframework.core.env.JOptCommandLinePropertySource
    since 6.1 with no plans for a replacement
    org.springframework.core.io.PathResource
    since 7.0 in favor of FileSystemResource
    org.springframework.jdbc.core.support.AbstractLobCreatingPreparedStatementCallback
    as of 6.2, in favor of SqlBinaryValue and SqlCharacterValue
    org.springframework.jdbc.core.support.AbstractLobStreamingResultSetExtractor
    as of 6.2 along with LobHandler, in favor of ResultSet.getBinaryStream(int)/ResultSet.getCharacterStream(int) usage
    org.springframework.jdbc.core.support.JdbcBeanDefinitionReader
    as of 5.3, in favor of Spring's common bean definition formats and/or custom reader implementations
    org.springframework.jdbc.core.support.SqlLobValue
    as of 6.2, in favor of SqlBinaryValue and SqlCharacterValue
    org.springframework.jdbc.support.lob.AbstractLobHandler
    as of 6.2, in favor of SqlBinaryValue and SqlCharacterValue
    org.springframework.jdbc.support.lob.DefaultLobHandler
    as of 6.2, in favor of SqlBinaryValue and SqlCharacterValue
    org.springframework.jdbc.support.lob.TemporaryLobCreator
    as of 6.2, in favor of SqlBinaryValue and SqlCharacterValue
    org.springframework.jdbc.support.xml.Jdbc4SqlXmlHandler
    as of 6.2, in favor of direct ResultSet.getSQLXML(int) and Connection.createSQLXML() usage, possibly in combination with a custom SqlValue implementation
    org.springframework.r2dbc.core.Parameter
    since 6.0, use io.r2dbc.spi.Parameter instead.
    org.springframework.scheduling.annotation.AsyncConfigurerSupport
    as of 6.0 in favor of implementing AsyncConfigurer directly
    org.springframework.scheduling.annotation.AsyncResult
    as of 6.0, in favor of CompletableFuture
    org.springframework.test.util.JsonExpectationsHelper
    in favor of using JSONAssert directly or the JsonComparator abstraction
    org.springframework.transaction.config.JtaTransactionManagerFactoryBean
    as of 6.0, in favor of a straight JtaTransactionManager definition
    org.springframework.transaction.support.TransactionSynchronizationAdapter
    as of 5.3, in favor of the default methods on the TransactionSynchronization interface
    org.springframework.util.comparator.ComparableComparator
    as of 6.1 in favor of Comparator.naturalOrder()
    org.springframework.util.comparator.NullSafeComparator
    as of 6.1 in favor of Comparator.nullsLast(java.util.Comparator<? super T>) and Comparator.nullsFirst(java.util.Comparator<? super T>)
    org.springframework.util.concurrent.FutureAdapter
    as of 6.0, with no concrete replacement
    org.springframework.web.servlet.handler.HandlerMappingIntrospector
    in favor of using just PathPatternParser; when HandlerMappingIntrospector.allHandlerMappingsUsePathPatternParser() returns true, it is sufficient to use that to align with handler mappings.
    org.springframework.web.servlet.handler.RequestMatchResult
    together with HandlerMappingIntrospector without a replacement.
    org.springframework.web.servlet.mvc.condition.PatternsRequestCondition
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
  • Deprecated Exceptions
    Exceptions
    Description
    org.springframework.core.task.TaskTimeoutException
    as of 5.3.16 since the common executors do not support start timeouts
    org.springframework.dao.CannotSerializeTransactionException
    as of 6.0.3, in favor of PessimisticLockingFailureException/CannotAcquireLockException
    org.springframework.dao.CleanupFailureDataAccessException
    as of 6.0.3 since it is not in use within core JDBC/ORM support
    org.springframework.dao.DeadlockLoserDataAccessException
    as of 6.0.3, in favor of PessimisticLockingFailureException/CannotAcquireLockException
    org.springframework.jdbc.LobRetrievalFailureException
    as of 6.2 along with LobHandler
    org.springframework.jdbc.support.xml.SqlXmlFeatureNotImplementedException
    as of 6.2, in favor of direct ResultSet.getSQLXML(int) and Connection.createSQLXML() usage, possibly in combination with a custom SqlValue implementation
  • Deprecated Annotation Interfaces
    Annotation Interface
    Description
    org.springframework.lang.NonNull
    since 7.0; use NonNull instead
    org.springframework.lang.NonNullApi
    since 7.0; use NullMarked instead
    org.springframework.lang.NonNullFields
    since 7.0; use NullMarked instead
    org.springframework.lang.Nullable
    since 7.0; use Nullable instead
  • Deprecated Fields
    Field
    Description
    org.springframework.asm.ClassReader.b
    Use ClassReader.readByte(int) and the other read methods instead. This field will eventually be deleted.
    org.springframework.beans.factory.config.AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT
    as of Spring 3.0: If you are using mixed autowiring strategies, prefer annotation-based autowiring for clearer demarcation of autowiring needs.
    org.springframework.beans.factory.support.AbstractBeanDefinition.AUTOWIRE_AUTODETECT
    as of Spring 3.0: If you are using mixed autowiring strategies, use annotation-based autowiring for clearer demarcation of autowiring needs.
    org.springframework.cglib.core.KeyFactory.OBJECT_BY_CLASS
    this customizer might result in unexpected class leak since key object still holds a strong reference to the Object and class. It is recommended to have pre-processing method that would strip Objects and represent Classes as Strings
    org.springframework.core.annotation.AnnotationFilter.NONE
    as of 5.2.6 since the MergedAnnotations model always ignores lang annotations according to the AnnotationFilter.PLAIN filter (for efficiency reasons)
    org.springframework.core.task.AsyncTaskExecutor.TIMEOUT_IMMEDIATE
    as of 5.3.16 along with AsyncTaskExecutor.execute(Runnable, long)
    org.springframework.core.task.AsyncTaskExecutor.TIMEOUT_INDEFINITE
    as of 5.3.16 along with AsyncTaskExecutor.execute(Runnable, long)
    org.springframework.jmx.export.MBeanExporter.AUTODETECT_ALL
    as of 6.1, in favor of the "autodetect" flag
    org.springframework.jmx.export.MBeanExporter.AUTODETECT_ASSEMBLER
    as of 6.1, in favor of the "autodetect" flag
    org.springframework.jmx.export.MBeanExporter.AUTODETECT_MBEAN
    as of 6.1, in favor of the "autodetect" flag
    org.springframework.jmx.export.MBeanExporter.AUTODETECT_NONE
    as of 6.1, in favor of the "autodetect" flag
    org.springframework.web.servlet.HandlerMapping.LOOKUP_PATH
    as of 5.3 in favor of UrlPathHelper.PATH_ATTRIBUTE and ServletRequestPathUtils.PATH_ATTRIBUTE. To access the cached path used for request mapping, use ServletRequestPathUtils.getCachedPathValue(ServletRequest).
  • Deprecated Methods
    Method
    Description
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onConstructor(Constructor<?>)
    since 7.0 in favor of ReflectionHintsPredicates.onConstructorInvocation(Constructor) or ReflectionHintsPredicates.onType(Class).
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onField(Class<?>, String)
    since 7.0 in favor of ReflectionHintsPredicates.onFieldAccess(Class, String) with similar semantics.
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onField(Field)
    since 7.0 in favor of ReflectionHintsPredicates.onFieldAccess(Field) with similar semantics.
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onField(String, String)
    since 7.0 in favor of ReflectionHintsPredicates.onFieldAccess(String, String) with similar semantics.
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onMethod(Class<?>, String)
    since 7.0 in favor of ReflectionHintsPredicates.onMethodInvocation(Class, String) or ReflectionHintsPredicates.onType(Class).
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onMethod(Method)
    since 7.0 in favor of ReflectionHintsPredicates.onMethodInvocation(Method) or ReflectionHintsPredicates.onType(Class).
    org.springframework.aot.hint.predicate.ReflectionHintsPredicates.onMethod(String, String)
    since 7.0 in favor of ReflectionHintsPredicates.onMethodInvocation(String, String) or ReflectionHintsPredicates.onType(Class).
    org.springframework.aot.hint.support.FilePatternResourceHintsRegistrar.Builder.withClasspathLocations(String...)
    in favor of FilePatternResourceHintsRegistrar.Builder.withClassPathLocations(String...)
    org.springframework.aot.hint.support.FilePatternResourceHintsRegistrar.Builder.withClasspathLocations(List<String>)
    in favor of FilePatternResourceHintsRegistrar.Builder.withClassPathLocations(List)
    org.springframework.asm.Attribute.getLabels()
    no longer used by ASM.
    org.springframework.asm.ClassWriter.newHandle(int, String, String, String)
    this method is superseded by ClassWriter.newHandle(int, String, String, String, boolean).
    org.springframework.asm.MethodVisitor.visitMethodInsn(int, String, String, String)
    use MethodVisitor.visitMethodInsn(int, String, String, String, boolean) instead.
    org.springframework.beans.BeanUtils.instantiate(Class<T>)
    as of Spring 5.0, following the deprecation of Class.newInstance() in JDK 9
    org.springframework.beans.factory.aot.InstanceSupplierCodeGenerator.generateCode(RegisteredBean, Executable)
    in favor of InstanceSupplierCodeGenerator.generateCode(RegisteredBean, InstantiationDescriptor)
    org.springframework.beans.factory.config.AutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(Object, String)
    as of 6.1, in favor of implicit post-processing through AutowireCapableBeanFactory.initializeBean(Object, String)
    org.springframework.beans.factory.config.AutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(Object, String)
    as of 6.1, in favor of implicit post-processing through AutowireCapableBeanFactory.initializeBean(Object, String)
    org.springframework.beans.factory.config.AutowireCapableBeanFactory.createBean(Class<?>, int, boolean)
    as of 6.1, in favor of AutowireCapableBeanFactory.createBean(Class)
    org.springframework.beans.factory.config.SingletonBeanRegistry.getSingletonMutex()
    as of 6.2, in favor of lenient singleton locking (with this method returning an arbitrary object to lock on)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(Object, String)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(Object, String)
    org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(Class<?>, int, boolean)
    org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingletonMutex()
    org.springframework.beans.factory.support.RegisteredBean.resolveConstructorOrFactoryMethod()
    in favor of RegisteredBean.resolveInstantiationDescriptor()
    org.springframework.cglib.core.CodeEmitter.invoke_static(Type, Signature)
    org.springframework.cglib.core.EmitUtils.append_string(CodeEmitter, Type, EmitUtils.ArrayDelimiters, Customizer)
    use EmitUtils.append_string(CodeEmitter, Type, ArrayDelimiters, CustomizerRegistry) instead
    org.springframework.cglib.core.EmitUtils.hash_code(CodeEmitter, Type, int, Customizer)
    use EmitUtils.hash_code(CodeEmitter, Type, int, CustomizerRegistry) instead
    org.springframework.cglib.core.EmitUtils.not_equals(CodeEmitter, Type, Label, Customizer)
    use EmitUtils.not_equals(CodeEmitter, Type, Label, CustomizerRegistry) instead
    org.springframework.cglib.core.internal.CustomizerRegistry.singleton(Customizer)
    Only to keep backward compatibility.
    org.springframework.cglib.core.KeyFactory.Generator.setCustomizer(Customizer)
    Use KeyFactory.Generator.addCustomizer(KeyFactoryCustomizer) instead.
    org.springframework.context.annotation.Configuration.enforceUniqueMethods()
    as of 7.0, always relying on @Bean unique methods, just possibly with Optional/ObjectProvider arguments
    org.springframework.context.support.AbstractResourceBasedMessageSource.isFallbackToSystemLocale()
    as of 5.2.2, in favor of AbstractResourceBasedMessageSource.getDefaultLocale()
    org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(ConfigurableListableBeanFactory, Properties)
    in favor of PropertySourcesPlaceholderConfigurer.processProperties(ConfigurableListableBeanFactory, ConfigurablePropertyResolver)
    org.springframework.core.annotation.AnnotationUtils.findAnnotationDeclaringClass(Class<? extends Annotation>, Class<?>)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.findAnnotationDeclaringClassForTypes(List<Class<? extends Annotation>>, Class<?>)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.getAnnotations(AnnotatedElement)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.getAnnotations(Method)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.getDeclaredRepeatableAnnotations(AnnotatedElement, Class<A>)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.getDeclaredRepeatableAnnotations(AnnotatedElement, Class<A>, Class<? extends Annotation>)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.getRepeatableAnnotations(AnnotatedElement, Class<A>)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.getRepeatableAnnotations(AnnotatedElement, Class<A>, Class<? extends Annotation>)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.isAnnotationInherited(Class<? extends Annotation>, Class<?>)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.annotation.AnnotationUtils.isAnnotationMetaPresent(Class<? extends Annotation>, Class<? extends Annotation>)
    as of 5.2 since it is superseded by the MergedAnnotations API
    org.springframework.core.codec.AbstractDataBufferDecoder.decodeDataBuffer(DataBuffer, ResolvableType, MimeType, Map<String, Object>)
    as of 5.2, please implement Decoder.decode(DataBuffer, ResolvableType, MimeType, Map) instead
    org.springframework.core.env.AbstractEnvironment.acceptsProfiles(String...)
    org.springframework.core.env.Environment.acceptsProfiles(String...)
    as of 5.1 in favor of Environment.acceptsProfiles(Profiles) or Environment.matchesProfiles(String...)
    org.springframework.core.GenericTypeResolver.resolveParameterType(MethodParameter, Class<?>)
    since 5.2 in favor of methodParameter.withContainingClass(implementationClass).getParameterType()
    org.springframework.core.io.buffer.DataBuffer.asByteBuffer()
    as of 6.0, in favor of DataBuffer.toByteBuffer(ByteBuffer), DataBuffer.readableByteBuffers(), or DataBuffer.writableByteBuffers().
    org.springframework.core.io.buffer.DataBuffer.asByteBuffer(int, int)
    as of 6.0, in favor of DataBuffer.toByteBuffer(int, ByteBuffer, int, int), DataBuffer.readableByteBuffers(), or DataBuffer.writableByteBuffers().
    org.springframework.core.io.buffer.DataBuffer.capacity(int)
    as of 6.0, in favor of DataBuffer.ensureWritable(int), which has different semantics
    org.springframework.core.io.buffer.DataBuffer.ensureCapacity(int)
    since 6.0, in favor of DataBuffer.ensureWritable(int)
    org.springframework.core.io.buffer.DataBuffer.retainedSlice(int, int)
    as of 6.0, in favor of DataBuffer.split(int), which has different semantics
    org.springframework.core.io.buffer.DataBuffer.slice(int, int)
    as of 6.0, in favor of DataBuffer.split(int), which has different semantics
    org.springframework.core.io.buffer.DataBuffer.toByteBuffer()
    as of 6.0.5, in favor of DataBuffer.toByteBuffer(ByteBuffer)
    org.springframework.core.io.buffer.DataBuffer.toByteBuffer(int, int)
    as of 6.0.5, in favor of DataBuffer.toByteBuffer(int, ByteBuffer, int, int)
    org.springframework.core.io.buffer.DataBufferFactory.allocateBuffer()
    as of 6.0, in favor of DataBufferFactory.allocateBuffer(int)
    org.springframework.core.io.buffer.DataBufferWrapper.asByteBuffer()
    org.springframework.core.io.buffer.DataBufferWrapper.asByteBuffer(int, int)
    org.springframework.core.io.buffer.DataBufferWrapper.capacity(int)
    org.springframework.core.io.buffer.DataBufferWrapper.ensureCapacity(int)
    org.springframework.core.io.buffer.DataBufferWrapper.retainedSlice(int, int)
    org.springframework.core.io.buffer.DataBufferWrapper.slice(int, int)
    org.springframework.core.io.buffer.DataBufferWrapper.toByteBuffer()
    org.springframework.core.io.buffer.DataBufferWrapper.toByteBuffer(int, int)
    org.springframework.core.io.buffer.DefaultDataBuffer.asByteBuffer()
    org.springframework.core.io.buffer.DefaultDataBuffer.asByteBuffer(int, int)
    org.springframework.core.io.buffer.DefaultDataBuffer.capacity(int)
    org.springframework.core.io.buffer.DefaultDataBuffer.slice(int, int)
    org.springframework.core.io.buffer.DefaultDataBuffer.toByteBuffer(int, int)
    org.springframework.core.io.buffer.DefaultDataBufferFactory.allocateBuffer()
    org.springframework.core.io.buffer.JettyDataBuffer.asByteBuffer()
    org.springframework.core.io.buffer.JettyDataBuffer.asByteBuffer(int, int)
    org.springframework.core.io.buffer.JettyDataBuffer.capacity(int)
    org.springframework.core.io.buffer.JettyDataBuffer.slice(int, int)
    org.springframework.core.io.buffer.JettyDataBuffer.toByteBuffer(int, int)
    org.springframework.core.io.buffer.JettyDataBufferFactory.allocateBuffer()
    org.springframework.core.io.buffer.NettyDataBuffer.asByteBuffer()
    org.springframework.core.io.buffer.NettyDataBuffer.asByteBuffer(int, int)
    org.springframework.core.io.buffer.NettyDataBuffer.capacity(int)
    org.springframework.core.io.buffer.NettyDataBuffer.retainedSlice(int, int)
    org.springframework.core.io.buffer.NettyDataBuffer.slice(int, int)
    org.springframework.core.io.buffer.NettyDataBuffer.toByteBuffer(int, int)
    org.springframework.core.io.buffer.NettyDataBufferFactory.allocateBuffer()
    org.springframework.core.io.support.SpringFactoriesLoader.loadFactoryNames(Class<?>, ClassLoader)
    as of 6.0 in favor of SpringFactoriesLoader.load(Class, ArgumentResolver, FailureHandler)
    org.springframework.core.MethodParameter.decreaseNestingLevel()
    since 5.2 in favor of retaining the original MethodParameter and using MethodParameter.nested(Integer) if nesting is required
    org.springframework.core.MethodParameter.forMethodOrConstructor(Object, int)
    as of 5.0, in favor of MethodParameter.forExecutable(java.lang.reflect.Executable, int)
    org.springframework.core.MethodParameter.increaseNestingLevel()
    since 5.2 in favor of MethodParameter.nested(Integer)
    org.springframework.core.MethodParameter.setTypeIndexForCurrentLevel(int)
    since 5.2 in favor of MethodParameter.withTypeIndex(int)
    org.springframework.core.NestedExceptionUtils.buildMessage(String, Throwable)
    as of 6.0, in favor of custom exception messages with selective inclusion of cause messages
    org.springframework.core.task.AsyncTaskExecutor.execute(Runnable, long)
    as of 5.3.16 since the common executors do not support start timeouts
    org.springframework.core.task.SimpleAsyncTaskExecutor.execute(Runnable, long)
    org.springframework.expression.spel.ast.SpelNodeImpl.generateCodeForArgument(MethodVisitor, CodeFlow, SpelNodeImpl, String)
    as of 6.2, in favor of CodeFlow.generateCodeForArgument(MethodVisitor, SpelNode, String)
    org.springframework.expression.spel.ast.SpelNodeImpl.generateCodeForArguments(MethodVisitor, CodeFlow, Member, SpelNodeImpl[])
    as of 6.2, in favor of SpelNodeImpl.generateCodeForArguments(MethodVisitor, CodeFlow, Executable, SpelNodeImpl[])
    org.springframework.http.HttpHeaders.asMultiValueMap()
    This method is provided for backward compatibility with APIs that would only accept maps. Generally avoid using HttpHeaders as a Map or MultiValueMap.
    org.springframework.http.HttpHeaders.asSingleValueMap()
    in favor of HttpHeaders.toSingleValueMap() which performs a copy but ensures that collection-iterating methods like entrySet() are case-insensitive
    org.springframework.jdbc.core.JdbcOperations.query(String, Object[], ResultSetExtractor<T>)
    as of 5.3, in favor of JdbcOperations.query(String, ResultSetExtractor, Object...)
    org.springframework.jdbc.core.JdbcOperations.query(String, Object[], RowCallbackHandler)
    as of 5.3, in favor of JdbcOperations.query(String, RowCallbackHandler, Object...)
    org.springframework.jdbc.core.JdbcOperations.query(String, Object[], RowMapper<T>)
    as of 5.3, in favor of JdbcOperations.query(String, RowMapper, Object...)
    org.springframework.jdbc.core.JdbcOperations.queryForList(String, Object[], Class<T>)
    as of 5.3, in favor of JdbcOperations.queryForList(String, Class, Object...)
    org.springframework.jdbc.core.JdbcOperations.queryForObject(String, Object[], Class<T>)
    as of 5.3, in favor of JdbcOperations.queryForObject(String, Class, Object...)
    org.springframework.jdbc.core.JdbcOperations.queryForObject(String, Object[], RowMapper<T>)
    as of 5.3, in favor of JdbcOperations.queryForObject(String, RowMapper, Object...)
    org.springframework.jdbc.core.JdbcTemplate.query(String, Object[], ResultSetExtractor<T>)
    org.springframework.jdbc.core.JdbcTemplate.query(String, Object[], RowCallbackHandler)
    org.springframework.jdbc.core.JdbcTemplate.query(String, Object[], RowMapper<T>)
    org.springframework.jdbc.core.JdbcTemplate.queryForList(String, Object[], Class<T>)
    org.springframework.jdbc.core.JdbcTemplate.queryForObject(String, Object[], Class<T>)
    org.springframework.jdbc.core.JdbcTemplate.queryForObject(String, Object[], RowMapper<T>)
    org.springframework.jdbc.datasource.DataSourceUtils.resetConnectionAfterTransaction(Connection, Integer)
    as of 5.1.11, in favor of DataSourceUtils.resetConnectionAfterTransaction(Connection, Integer, boolean)
    org.springframework.jdbc.SQLWarningException.SQLWarning()
    as of 5.3.29, in favor of SQLWarningException.getSQLWarning()
    org.springframework.jdbc.support.DatabaseStartupValidator.setValidationQuery(String)
    as of 5.3, in favor of the JDBC 4.0 connection validation
    org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(DataSource, String)
    as of 5.2.9, in favor of JdbcUtils.extractDatabaseMetaData(DataSource, DatabaseMetaDataCallback) with a lambda expression or method reference and a generically typed result
    org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.customTranslate(String, String, SQLException)
    as of 6.1, in favor of AbstractFallbackSQLExceptionTranslator.setCustomTranslator(org.springframework.jdbc.support.SQLExceptionTranslator)
    org.springframework.jmx.export.MBeanExporter.setAutodetectMode(int)
    as of 6.1, in favor of the "autodetect" flag
    org.springframework.jmx.export.MBeanExporter.setAutodetectModeName(String)
    as of 6.1, in favor of the "autodetect" flag
    org.springframework.messaging.rsocket.RSocketRequester.Builder.connect(ClientTransport)
    as of 5.3 in favor of RSocketRequester.Builder.transport(ClientTransport)
    org.springframework.messaging.rsocket.RSocketRequester.Builder.connectTcp(String, int)
    as of 5.3 in favor of RSocketRequester.Builder.tcp(String, int)
    org.springframework.messaging.rsocket.RSocketRequester.Builder.connectWebSocket(URI)
    as of 5.3 in favor of RSocketRequester.Builder.websocket(URI)
    org.springframework.orm.hibernate5.HibernateTransactionManager.setAllowResultAccessAfterCompletion(boolean)
    as of 5.3.29 since Hibernate 5.x aggressively closes ResultSets on commit, making it impossible to rely on ResultSet holdability. Also, Spring does not provide an equivalent setting on JpaTransactionManager.
    org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor.createRunnable(Object, Method)
    in favor of ScheduledAnnotationBeanPostProcessor.createRunnable(Object, Method, String)
    org.springframework.scheduling.concurrent.ConcurrentTaskExecutor.execute(Runnable, long)
    org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.isRemoveOnCancelPolicy()
    as of 5.3.9, in favor of direct ThreadPoolTaskScheduler.getScheduledThreadPoolExecutor() access
    org.springframework.scheduling.config.IntervalTask.getInitialDelay()
    as of 6.0, in favor of IntervalTask.getInitialDelayDuration()
    org.springframework.scheduling.config.IntervalTask.getInterval()
    as of 6.0, in favor of IntervalTask.getIntervalDuration()
    org.springframework.scheduling.config.ScheduledTaskRegistrar.addFixedDelayTask(Runnable, long)
    as of 6.0, in favor of ScheduledTaskRegistrar.addFixedDelayTask(Runnable, Duration)
    org.springframework.scheduling.config.ScheduledTaskRegistrar.addFixedRateTask(Runnable, long)
    as of 6.0, in favor of ScheduledTaskRegistrar.addFixedRateTask(Runnable, Duration)
    org.springframework.scheduling.support.PeriodicTrigger.getInitialDelay()
    as of 6.0, in favor on PeriodicTrigger.getInitialDelayDuration()
    org.springframework.scheduling.support.PeriodicTrigger.getPeriod()
    as of 6.0, in favor on PeriodicTrigger.getPeriodDuration()
    org.springframework.scheduling.support.PeriodicTrigger.getTimeUnit()
    as of 6.0, with no direct replacement
    org.springframework.scheduling.support.PeriodicTrigger.setInitialDelay(long)
    as of 6.0, in favor of PeriodicTrigger.setInitialDelay(Duration)
    org.springframework.scheduling.support.SimpleTriggerContext.update(Date, Date, Date)
    as of 6.0, in favor of SimpleTriggerContext.update(Instant, Instant, Instant)
    org.springframework.scheduling.TaskScheduler.schedule(Runnable, Date)
    as of 6.0, in favor of TaskScheduler.schedule(Runnable, Instant)
    org.springframework.scheduling.TaskScheduler.scheduleAtFixedRate(Runnable, long)
    as of 6.0, in favor of TaskScheduler.scheduleAtFixedRate(Runnable, Duration)
    org.springframework.scheduling.TaskScheduler.scheduleAtFixedRate(Runnable, Date, long)
    as of 6.0, in favor of TaskScheduler.scheduleAtFixedRate(Runnable, Instant, Duration)
    org.springframework.scheduling.TaskScheduler.scheduleWithFixedDelay(Runnable, long)
    as of 6.0, in favor of TaskScheduler.scheduleWithFixedDelay(Runnable, Duration)
    org.springframework.scheduling.TaskScheduler.scheduleWithFixedDelay(Runnable, Date, long)
    as of 6.0, in favor of TaskScheduler.scheduleWithFixedDelay(Runnable, Instant, Duration)
    org.springframework.scheduling.Trigger.nextExecutionTime(TriggerContext)
    as of 6.0, in favor of Trigger.nextExecution(TriggerContext)
    org.springframework.scheduling.TriggerContext.lastActualExecutionTime()
    as of 6.0, in favor on TriggerContext.lastActualExecution()
    org.springframework.scheduling.TriggerContext.lastCompletionTime()
    as of 6.0, in favor on TriggerContext.lastCompletion()
    org.springframework.scheduling.TriggerContext.lastScheduledExecutionTime()
    as of 6.0, in favor on TriggerContext.lastScheduledExecution()
    org.springframework.test.context.ContextLoader.loadContext(String...)
    as of Spring Framework 6.0, in favor of methods defined in the SmartContextLoader SPI
    org.springframework.test.context.ContextLoader.processLocations(Class<?>, String...)
    as of Spring Framework 6.0, in favor of methods defined in the SmartContextLoader SPI
    org.springframework.test.context.MergedContextConfiguration.getPropertySourceLocations()
    since 6.1 in favor of MergedContextConfiguration.getPropertySourceDescriptors()
    org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(String...)
    as of Spring Framework 6.0, in favor of AbstractGenericContextLoader.loadContext(MergedContextConfiguration)
    org.springframework.test.web.client.match.ContentRequestMatchers.json(String, boolean)
    in favor of ContentRequestMatchers.json(String, JsonCompareMode)
    org.springframework.test.web.reactive.server.WebTestClient.BodyContentSpec.json(String, boolean)
    in favor of WebTestClient.BodyContentSpec.json(String, JsonCompareMode)
    org.springframework.test.web.servlet.request.MockMvcRequestBuilders.request(String, URI)
    in favor of MockMvcRequestBuilders.request(HttpMethod, URI)
    org.springframework.test.web.servlet.result.ContentResultMatchers.json(String, boolean)
    in favor of ContentResultMatchers.json(String, JsonCompareMode)
    org.springframework.test.web.servlet.setup.StandaloneMockMvcBuilder.setRemoveSemicolonContent(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.transaction.interceptor.TransactionAspectSupport.determineTransactionManager(TransactionAttribute)
    as of 6.2, in favor of TransactionAspectSupport.determineTransactionManager(TransactionAttribute, Class)
    org.springframework.util.ClassUtils.getInterfaceMethodIfPossible(Method)
    in favor of ClassUtils.getInterfaceMethodIfPossible(Method, Class)
    org.springframework.util.ClassUtils.isCglibProxy(Object)
    as of 5.2, in favor of custom (possibly narrower) checks such as for a Spring AOP proxy
    org.springframework.util.ClassUtils.isCglibProxyClass(Class<?>)
    as of 5.2, in favor of custom (possibly narrower) checks or simply a check for containing ClassUtils.CGLIB_CLASS_SEPARATOR
    org.springframework.util.ClassUtils.isCglibProxyClassName(String)
    as of 5.2, in favor of custom (possibly narrower) checks or simply a check for containing ClassUtils.CGLIB_CLASS_SEPARATOR
    org.springframework.util.ConcurrentLruCache.sizeLimit()
    in favor of ConcurrentLruCache.capacity() as of 6.0.
    org.springframework.util.ObjectUtils.nullSafeHashCode(boolean[])
    as of 6.1 in favor of Arrays.hashCode(boolean[])
    org.springframework.util.ObjectUtils.nullSafeHashCode(byte[])
    as of 6.1 in favor of Arrays.hashCode(byte[])
    org.springframework.util.ObjectUtils.nullSafeHashCode(char[])
    as of 6.1 in favor of Arrays.hashCode(char[])
    org.springframework.util.ObjectUtils.nullSafeHashCode(double[])
    as of 6.1 in favor of Arrays.hashCode(double[])
    org.springframework.util.ObjectUtils.nullSafeHashCode(float[])
    as of 6.1 in favor of Arrays.hashCode(float[])
    org.springframework.util.ObjectUtils.nullSafeHashCode(int[])
    as of 6.1 in favor of Arrays.hashCode(int[])
    org.springframework.util.ObjectUtils.nullSafeHashCode(long[])
    as of 6.1 in favor of Arrays.hashCode(long[])
    org.springframework.util.ObjectUtils.nullSafeHashCode(short[])
    as of 6.1 in favor of Arrays.hashCode(short[])
    org.springframework.util.ObjectUtils.nullSafeHashCode(Object[])
    as of 6.1 in favor of Arrays.hashCode(Object[])
    org.springframework.util.SerializationUtils.deserialize(byte[])
    This utility uses Java Object Serialization, which allows arbitrary code to be run and is known for being the source of many Remote Code Execution (RCE) vulnerabilities.

    Prefer the use of an external tool (that serializes to JSON, XML, or any other format) which is regularly checked and updated for not allowing RCE.

    org.springframework.util.StopWatch.getLastTaskInfo()
    as of 6.1, in favor of StopWatch.lastTaskInfo()
    org.springframework.util.StopWatch.getLastTaskName()
    as of 6.1, in favor of StopWatch.lastTaskInfo()
    org.springframework.util.StopWatch.getLastTaskTimeMillis()
    as of 6.1, in favor of StopWatch.lastTaskInfo()
    org.springframework.util.StopWatch.getLastTaskTimeNanos()
    as of 6.1, in favor of StopWatch.lastTaskInfo()
    org.springframework.util.StreamUtils.emptyInput()
    as of 6.0 in favor of InputStream.nullInputStream()
    org.springframework.util.StringUtils.isEmpty(Object)
    as of 5.3, in favor of StringUtils.hasLength(String) and StringUtils.hasText(String) (or ObjectUtils.isEmpty(Object))
    org.springframework.util.StringUtils.trimLeadingWhitespace(String)
    since 6.0, in favor of String.stripLeading()
    org.springframework.util.StringUtils.trimTrailingWhitespace(String)
    since 6.0, in favor of String.stripTrailing()
    org.springframework.util.StringUtils.trimWhitespace(String)
    since 6.0, in favor of String.strip()
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setAlwaysUseFullPath(boolean)
    as of 5.3 in favor of using UrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please see UrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setRemoveSemicolonContent(boolean)
    as of 5.3 in favor of using UrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please see UrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setUrlDecode(boolean)
    as of 5.3 in favor of using UrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper), if at all. For further details, please see UrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean).
    org.springframework.web.cors.UrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.reactive.function.server.RequestPredicates.pathExtension(String)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.reactive.function.server.RequestPredicates.pathExtension(Predicate<String>)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.reactive.function.server.RequestPredicates.Visitor.pathExtension(String)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.servlet.config.annotation.InterceptorRegistration.pathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.getPathMatcher()
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.getPathMatcherOrDefault()
    use of PathMatcher is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.getUrlPathHelper()
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.getUrlPathHelperOrDefault()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.preferPathMatcher()
    use of PathMatcher is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.setPathMatcher(PathMatcher)
    use of PathMatcher is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.PathMatchConfigurer.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.mvcPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.mvcUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.function.RequestPredicates.pathExtension(String)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.servlet.function.RequestPredicates.pathExtension(Predicate<String>)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.servlet.function.RequestPredicates.Visitor.pathExtension(String)
    without replacement to discourage use of path extensions for request mapping and for content negotiation (with similar deprecations and removals already applied to annotated controllers). For further context, please read issue #24179
    org.springframework.web.servlet.function.support.RouterFunctionMapping.match(HttpServletRequest, String)
    org.springframework.web.servlet.handler.AbstractHandlerMapping.getPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.AbstractHandlerMapping.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.AbstractHandlerMapping.setAlwaysUseFullPath(boolean)
    as of 6.0, in favor of using AbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)
    org.springframework.web.servlet.handler.AbstractHandlerMapping.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.AbstractHandlerMapping.setRemoveSemicolonContent(boolean)
    as of 6.0, in favor of using AbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)
    org.springframework.web.servlet.handler.AbstractHandlerMapping.setUrlDecode(boolean)
    as of 6.0, in favor of using AbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)
    org.springframework.web.servlet.handler.AbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.match(HttpServletRequest, String)
    org.springframework.web.servlet.handler.MappedInterceptor.getPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.MappedInterceptor.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.handler.MatchableHandlerMapping.match(HttpServletRequest, String)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.setAlwaysUseFullPath(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.setRemoveSemicolonContent(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.setUrlDecode(boolean)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.AbstractUrlViewController.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.match(HttpServletRequest, String)
    org.springframework.web.servlet.mvc.method.annotation.ServletCookieValueMethodArgumentResolver.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration.getPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration.getUrlPathHelper()
    as of 5.3, the path is resolved externally and obtained with ServletRequestPathUtils.getCachedPathValue(ServletRequest); this method always returns UrlPathHelper.defaultInstance.
    org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.RequestMappingInfo.BuilderConfiguration.setUrlPathHelper(UrlPathHelper)
    as of 5.3, the path is resolved externally and obtained with ServletRequestPathUtils.getCachedPathValue(ServletRequest)
    org.springframework.web.servlet.mvc.method.RequestMappingInfo.getPatternsCondition()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.WebContentInterceptor.lookupCacheControl(String)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.WebContentInterceptor.lookupCacheSeconds(String)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.WebContentInterceptor.setAlwaysUseFullPath(boolean)
    as of 5.3, the path is resolved externally and obtained with ServletRequestPathUtils.getCachedPathValue(ServletRequest)
    org.springframework.web.servlet.mvc.WebContentInterceptor.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.WebContentInterceptor.setUrlDecode(boolean)
    as of 5.3, the path is resolved externally and obtained with ServletRequestPathUtils.getCachedPathValue(ServletRequest)
    org.springframework.web.servlet.mvc.WebContentInterceptor.setUrlPathHelper(UrlPathHelper)
    as of 5.3, the path is resolved externally and obtained with ServletRequestPathUtils.getCachedPathValue(ServletRequest)
    org.springframework.web.servlet.resource.PathResourceResolver.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.PathResourceResolver.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.ResourceHttpRequestHandler.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.ResourceHttpRequestHandler.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.resource.ResourceUrlProvider.getPathMatcher()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.
    org.springframework.web.servlet.resource.ResourceUrlProvider.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.
    org.springframework.web.servlet.resource.ResourceUrlProvider.setPathMatcher(PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.
    org.springframework.web.servlet.resource.ResourceUrlProvider.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules. After the deprecation phase, it will no longer be possible to set a customized PathMatcher instance.
    org.springframework.web.servlet.support.AbstractFlashMapManager.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.support.AbstractFlashMapManager.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.support.RequestContext.getUrlPathHelper()
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.support.RequestContext.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry.getUrlPathHelper()
    org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.socket.config.annotation.StompEndpointRegistry.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry.getUrlPathHelper()
    org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry.setUrlPathHelper(UrlPathHelper)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
  • Deprecated Constructors
    Constructor
    Description
    org.springframework.asm.Handle(int, String, String, String)
    this constructor has been superseded by Handle(int, String, String, String, boolean).
    org.springframework.beans.factory.support.RootBeanDefinition(ResolvableType)
    as of 6.0.11, in favor of an extra RootBeanDefinition.setTargetType(ResolvableType) call
    org.springframework.core.type.StandardAnnotationMetadata(Class<?>)
    since 5.2 in favor of the factory method AnnotationMetadata.introspect(Class)
    org.springframework.core.type.StandardAnnotationMetadata(Class<?>, boolean)
    since 5.2 in favor of the factory method AnnotationMetadata.introspect(Class). Use MergedAnnotation.asMap from StandardAnnotationMetadata.getAnnotations() rather than AnnotatedTypeMetadata.getAnnotationAttributes(String) if nestedAnnotationsAsMap is false
    org.springframework.core.type.StandardClassMetadata(Class<?>)
    since 5.2 in favor of StandardAnnotationMetadata
    org.springframework.core.type.StandardMethodMetadata(Method)
    since 5.2 in favor of obtaining instances via AnnotationMetadata
    org.springframework.expression.spel.ast.OperatorMatches(int, int, SpelNodeImpl...)
    as of Spring Framework 5.2.23 in favor of invoking OperatorMatches(ConcurrentMap, int, int, SpelNodeImpl...) with a shared pattern cache instead
    org.springframework.http.HttpEntity(T, MultiValueMap<String, String>)
    in favor of HttpEntity(Object, HttpHeaders)
    org.springframework.http.HttpEntity(MultiValueMap<String, String>)
    in favor of HttpEntity(HttpHeaders)
    org.springframework.http.RequestEntity(T, MultiValueMap<String, String>, HttpMethod, URI, Type)
    in favor of RequestEntity(Object, HttpHeaders, HttpMethod, URI, Type)
    org.springframework.http.RequestEntity(T, MultiValueMap<String, String>, HttpMethod, URI)
    in favor of RequestEntity(Object, HttpHeaders, HttpMethod, URI)
    org.springframework.http.RequestEntity(MultiValueMap<String, String>, HttpMethod, URI)
    in favor of RequestEntity(HttpHeaders, HttpMethod, URI)
    org.springframework.http.ResponseEntity(T, MultiValueMap<String, String>, int)
    in favor of ResponseEntity(Object, HttpHeaders, int)
    org.springframework.http.ResponseEntity(T, MultiValueMap<String, String>, HttpStatusCode)
    in favor of ResponseEntity(Object, HttpHeaders, HttpStatusCode)
    org.springframework.http.ResponseEntity(MultiValueMap<String, String>, HttpStatusCode)
    in favor of ResponseEntity(HttpHeaders, HttpStatusCode)
    org.springframework.scheduling.concurrent.ConcurrentTaskExecutor()
    in favor of ConcurrentTaskExecutor(Executor) with an externally provided Executor
    org.springframework.scheduling.concurrent.ConcurrentTaskScheduler()
    in favor of ConcurrentTaskScheduler(ScheduledExecutorService) with an externally provided Executor
    org.springframework.scheduling.config.FixedDelayTask(Runnable, long, long)
    as of 6.0, in favor on FixedDelayTask(Runnable, Duration, Duration)
    org.springframework.scheduling.config.FixedRateTask(Runnable, long, long)
    as of 6.0, in favor on FixedRateTask(Runnable, Duration, Duration)
    org.springframework.scheduling.config.IntervalTask(Runnable, long)
    as of 6.0, in favor on IntervalTask(Runnable, Duration)
    org.springframework.scheduling.config.IntervalTask(Runnable, long, long)
    as of 6.0, in favor on IntervalTask(Runnable, Duration, Duration)
    org.springframework.scheduling.support.PeriodicTrigger(long)
    as of 6.0, in favor on PeriodicTrigger(Duration)
    org.springframework.scheduling.support.PeriodicTrigger(long, TimeUnit)
    as of 6.0, in favor on PeriodicTrigger(Duration)
    org.springframework.scheduling.support.SimpleTriggerContext(Date, Date, Date)
    as of 6.0, in favor of SimpleTriggerContext(Instant, Instant, Instant)
    org.springframework.test.context.MergedContextConfiguration(Class<?>, String[], Class<?>[], Set<Class<? extends ApplicationContextInitializer<?>>>, String[], String[], String[], Set<ContextCustomizer>, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
    since 6.1 in favor of MergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
    org.springframework.test.context.MergedContextConfiguration(Class<?>, String[], Class<?>[], Set<Class<? extends ApplicationContextInitializer<?>>>, String[], String[], String[], ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
    since 6.1 in favor of MergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
    org.springframework.test.context.web.WebMergedContextConfiguration(Class<?>, String[], Class<?>[], Set<Class<? extends ApplicationContextInitializer<?>>>, String[], String[], String[], Set<ContextCustomizer>, String, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
    since 6.1 in favor of WebMergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, String, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
    org.springframework.test.context.web.WebMergedContextConfiguration(Class<?>, String[], Class<?>[], Set<Class<? extends ApplicationContextInitializer<?>>>, String[], String[], String[], String, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
    since 6.1 in favor of WebMergedContextConfiguration(Class, String[], Class[], Set, String[], List, String[], Set, String, ContextLoader, CacheAwareContextLoaderDelegate, MergedContextConfiguration)
    org.springframework.test.util.JsonPathExpectationsHelper(String, Object...)
    in favor of calling String.formatted(Object...) upfront
    org.springframework.transaction.interceptor.TransactionInterceptor(PlatformTransactionManager, Properties)
    as of 5.2.5, in favor of TransactionAspectSupport.setTransactionAttributes(Properties)
    org.springframework.transaction.interceptor.TransactionInterceptor(PlatformTransactionManager, TransactionAttributeSource)
    as of 5.2.5, in favor of TransactionInterceptor(TransactionManager, TransactionAttributeSource)
    org.springframework.transaction.jta.SpringJtaSynchronizationAdapter(TransactionSynchronization, TransactionManager)
    as of 6.0.12 since JTA 1.1+ requires implicit rollback-only setting in case of an exception thrown in beforeCompletion, so the regular SpringJtaSynchronizationAdapter(TransactionSynchronization) constructor is sufficient for all scenarios
    org.springframework.transaction.jta.SpringJtaSynchronizationAdapter(TransactionSynchronization, UserTransaction)
    as of 6.0.12 since JTA 1.1+ requires implicit rollback-only setting in case of an exception thrown in beforeCompletion, so the regular SpringJtaSynchronizationAdapter(TransactionSynchronization) constructor is sufficient for all scenarios
    org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry(ApplicationContext, ServletContext, ContentNegotiationManager, UrlPathHelper)
    in favor of ResourceHandlerRegistry(ApplicationContext, ServletContext, ContentNegotiationManager)
    org.springframework.web.servlet.handler.RequestMatchResult(String, String, PathMatcher)
    use of PathMatcher and UrlPathHelper is deprecated for use at runtime in web modules in favor of parsed patterns with PathPatternParser.
    org.springframework.web.servlet.mvc.method.RequestMappingInfo(String, PatternsRequestCondition, RequestMethodsRequestCondition, ParamsRequestCondition, HeadersRequestCondition, ConsumesRequestCondition, ProducesRequestCondition, RequestCondition<?>)
    as of 5.3 in favor using RequestMappingInfo.Builder via RequestMappingInfo.paths(String...).
    org.springframework.web.servlet.mvc.method.RequestMappingInfo(PatternsRequestCondition, RequestMethodsRequestCondition, ParamsRequestCondition, HeadersRequestCondition, ConsumesRequestCondition, ProducesRequestCondition, RequestCondition<?>)
    as of 5.3 in favor using RequestMappingInfo.Builder via RequestMappingInfo.paths(String...).
    org.springframework.web.servlet.mvc.method.RequestMappingInfo(RequestMappingInfo, RequestCondition<?>)
    since 5.3 in favor of using RequestMappingInfo.addCustomCondition(RequestCondition).
  • Deprecated Enum Constants
    Enum Constant
    Description
    org.springframework.aot.hint.ExecutableMode.INTROSPECT
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.DECLARED_CLASSES
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.DECLARED_FIELDS
    in favor of MemberCategory.ACCESS_DECLARED_FIELDS with similar semantics.
    org.springframework.aot.hint.MemberCategory.INTROSPECT_DECLARED_CONSTRUCTORS
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.INTROSPECT_DECLARED_METHODS
    with no replacement since introspection is added by default when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.INTROSPECT_PUBLIC_CONSTRUCTORS
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.INTROSPECT_PUBLIC_METHODS
    with no replacement since introspection is added by default when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.PUBLIC_CLASSES
    with no replacement since introspection is included when adding a reflection hint for a type.
    org.springframework.aot.hint.MemberCategory.PUBLIC_FIELDS
    in favor of MemberCategory.ACCESS_PUBLIC_FIELDS with similar semantics.
  • Deprecated Annotation Interface Elements
    Annotation Interface Element
    Description
    org.springframework.context.annotation.Configuration.enforceUniqueMethods()
    as of 7.0, always relying on @Bean unique methods, just possibly with Optional/ObjectProvider arguments