Deprecated API
Contents
-
ElementDescriptionas of 6.0.12 in favor of the builderas of 6.1, in favor of the AOT engine.as of 6.1, in favor of the AOT engine.as of 6.1, in favor of the AOT engine.as of Spring Framework 6.2, in favor of
Indexer(boolean, int, int, SpelNodeImpl)
as of 6.2 with no replacement; to be removed in 7.0as of 6.2 with no replacement; to be removed in 7.0as of 6.2 with no replacement; to be removed in 7.0as of 6.2 with no replacement; to be removed in 7.0org.springframework.http.client.HttpComponentsClientHttpRequestFactory.setBufferRequestBody(boolean) since 6.1 requests are never buffered, as if this property isfalse
since 6.1, in favor of otherClientHttpRequestFactory
implementations; scheduled for removal in 6.2since 6.1 requests are never buffered, as if this property isfalse
as of 6.1 requests are always streamed, as if this property istrue
since 6.1, in favor ofResourceHttpMessageWriter.addDefaultHeaders(ReactiveHttpOutputMessage, Resource, MediaType, Map)
, for removal = 6.2as of 6.2 in favor ofHttpHeaders(MultiValueMap)
.as of 6.0.3, in favor ofMediaType.APPLICATION_GRAPHQL_RESPONSE
as of 6.0.3, in favor ofMediaType.APPLICATION_GRAPHQL_RESPONSE_VALUE
As of 6.0, with no direct replacementAs of 6.0, with no direct replacementAs of 6.0, in favor ofMimeTypeUtils.sortBySpecificity(List)
As of 6.0, with no direct replacementin favor of callingString.formatted(Object...)
upfrontin favor ofJsonPathAssertions.value(Class, Consumer)
in favor ofJsonPathAssertions.value(Class, Matcher)
in favor of callingString.formatted(Object...)
upfrontAs of 6.0, with no direct replacementAs of 6.0, with no direct replacementas of 6.2, in favor ofPropertyPlaceholderHelper(String, String, String, Character, boolean)
in favor of usingBindErrorUtils
andBindException.getAllErrors()
, to be removed in 6.2in favor ofBindErrorUtils
, to be removed in 6.2in favor of usingBindErrorUtils
andBindException.getAllErrors()
, to be removed in 6.2in favor of usingBindErrorUtils
andWebExchangeBindException.getAllErrors()
, to be removed in 6.2since 6.1 in favor ofWebHttpHandlerBuilder
.as of 6.1.2, in favor ofClientRequestObservationContext(ClientRequest.Builder)
in favor ofWebClientAdapter.create(WebClient)
aligning with other adapter implementations; to be removed in 6.2.as of Spring Framework 6.2 in favor ofLiteWebJarsResourceResolver
since 6.1, in favor ofFreeMarkerView.lookupTemplate(Locale)
, to be removed in 6.2in favor ofReactorHttpExchangeAdapter
in favour ofHttpRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)
to be removed in 6.2.in favor ofReactiveHttpRequestValues.Builder.addRequestPartPublisher(java.lang.String, P, org.springframework.core.ParameterizedTypeReference<T>)
; to be removed in 6.2in favour ofHttpRequestValues.Builder.createRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)
to be removed in 6.2.in favor ofReactiveHttpRequestValues.Builder.setBodyPublisher(P, org.springframework.core.ParameterizedTypeReference<T>)
; to be removed in 6.2in favor ofReactiveHttpRequestValues.getBodyPublisher()
; to be removed in 6.2in favor ofReactiveHttpRequestValues.getBodyPublisherElementType()
; to be removed in 6.2in favor ofHttpServiceProxyFactory.builderFor(HttpExchangeAdapter)
; to be removed in 6.2.in favor of setting the same directly on theHttpExchangeAdapter
in favor ofHttpServiceProxyFactory.Builder.exchangeAdapter(HttpExchangeAdapter)
; to be removed in 6.2in favor of setting the same directly on theHttpExchangeAdapter
as of 6.1 this property is set totrue
by default, and should not need to be customized; in effect,DispatcherServlet
should always raiseNoHandlerFoundException
and allow it to be handled through aHandlerExceptionResolver
.since 6.1 in favor ofMappedInterceptor.getIncludePathPatterns()
as of Spring Framework 6.2 in favor ofLiteWebJarsResourceResolver
in favor ofForwardedHeaderUtils.adaptFromForwardedHeaders(java.net.URI, org.springframework.http.HttpHeaders)
; to be removed in 6.2in favor ofForwardedHeaderUtils.parseForwardedFor(java.net.URI, org.springframework.http.HttpHeaders, java.net.InetSocketAddress)
; to be removed in 6.2
-
InterfaceDescriptionas of 6.0, in favor of
AsyncTaskExecutor.submitCompletable(Runnable)
andAsyncTaskExecutor.submitCompletable(Callable)
as of 6.2, in favor ofSqlBinaryValue
andSqlCharacterValue
as of 6.2, in favor ofSqlBinaryValue
andSqlCharacterValue
as of 6.2, in favor of directResultSet.getSQLXML(int)
andConnection.createSQLXML()
usage, possibly in combination with a customSqlValue
implementationas of 6.2, in favor of a directSqlValue
implementationas of 6.2, in favor of directSQLXML
usageas of 6.2, in favor of directSQLXML
usageas of 6.2, in favor of directSQLXML
usageas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.0, in favor ofCompletableFuture.whenComplete(BiConsumer)
as of 6.0, in favor ofCompletableFuture
as of 6.0, in favor ofCompletableFuture.whenComplete(BiConsumer)
as of 6.0, in favor ofCompletableFuture.whenComplete(BiConsumer)
in favor ofReactorHttpExchangeAdapter
as of 5.3.9 in favor of using thecheckNotModified
methods inWebRequest
, or from an annotated controller method, returning aResponseEntity
with an "ETag" and/or "Last-Modified" headers set.as of 6.0 in favor of using CSS, without direct replacement
-
ClassDescriptionin
spring-jcl
(effectively equivalent toNoOpLog
)since it is only meant to be used in the above-mentioned fallback scenarioThis class should only be used by the runtime-hints agent when instrumenting bytecode and is not considered public API.as of 5.2, along withPropertyPlaceholderConfigurer
as of 5.2; useorg.springframework.context.support.PropertySourcesPlaceholderConfigurer
instead which is more flexible through taking advantage of theEnvironment
andPropertySource
mechanisms.as of 5.3, in favor of Spring's common bean definition formats and/or custom reader implementationsas of 6.0 in favor of implementingCachingConfigurer
directlyas of 6.0 in favor of implementingJCacheConfigurer
directlyas of 6.1, in favor of the AOT engine.as of 6.1, in favor of the AOT engine.as of 6.1, in favor of the AOT engine.since 6.1 with no replacement; use an enum, map, or similar custom solution insteadsince 6.1 with no plans for a replacementsince 6.1, in favor of otherClientHttpRequestFactory
implementations; scheduled for removal in 6.2since 6.1 due to a package change; useReactorResourceFactory
instead.as of 6.2, in favor ofSqlBinaryValue
andSqlCharacterValue
as of 6.2 along withLobHandler
, in favor ofResultSet.getBinaryStream(int)
/ResultSet.getCharacterStream(int)
usageas of 5.3, in favor of Spring's common bean definition formats and/or custom reader implementationsas of 6.2, in favor ofSqlBinaryValue
andSqlCharacterValue
as of 6.2, in favor ofSqlBinaryValue
andSqlCharacterValue
as of 6.2, in favor ofSqlBinaryValue
andSqlCharacterValue
as of 6.2, in favor ofSqlBinaryValue
andSqlCharacterValue
as of 6.2, in favor of directResultSet.getSQLXML(int)
andConnection.createSQLXML()
usage, possibly in combination with a customSqlValue
implementationas of 6.0, in favor ofCompletableFutureReturnValueHandler
since 6.0, useio.r2dbc.spi.Parameter
instead.as of 6.0 in favor of implementingAsyncConfigurer
directlyas of 6.0, in favor ofCompletableFuture
as of 6.0, in favor of a straightJtaTransactionManager
definitionas of 5.3, in favor of the default methods on theTransactionSynchronization
interfaceas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.1 in favor ofComparator.naturalOrder()
as of 6.1 in favor ofComparator.nullsLast(java.util.Comparator<? super T>)
andComparator.nullsFirst(java.util.Comparator<? super T>)
as of 6.0, with no concrete replacementas of 6.0, with no concrete replacementas of 6.0, in favor ofCompletableFuture
as of 6.0, with no concrete replacementas of 6.0, with no concrete replacementas of 6.0, in favor ofMono.toFuture()
as of 6.0, in favor ofCompletableFuture
As of 6.0, with no direct replacementas of 5.2.4. See class-level note inContentNegotiationManagerFactoryBean
on the deprecation of path extension config options.as of 5.2.4. See class-level note inContentNegotiationManagerFactoryBean
on the deprecation of path extension config options.since 6.1 in favor ofWebHttpHandlerBuilder
.as of Spring 5.1 in favor of usingHttpHeaders.setBasicAuth(String, String)
while building the request.as of Spring Framework 6.2 in favor ofLiteWebJarsResourceResolver
as of Spring Framework 6.2 in favor ofLiteWebJarsResourceResolver
as of 6.0, with no direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 6.0 in favor of using CSS, without direct replacementas of 5.3, in favor of Spring's common view resolver variants and/or custom resolver implementationsas of 5.3, in favor of Spring's common view resolver variants and/or custom resolver implementationsas of 6.0 in favor ofResponseCookie
-
ExceptionsDescriptionas of 5.3.16 since the common executors do not support start timeoutsas of 6.0.3, in favor of
PessimisticLockingFailureException
/CannotAcquireLockException
as of 6.0.3 since it is not in use within core JDBC/ORM supportas of 6.0.3, in favor ofPessimisticLockingFailureException
/CannotAcquireLockException
as of 6.2 along withLobHandler
as of 6.2, in favor of directResultSet.getSQLXML(int)
andConnection.createSQLXML()
usage, possibly in combination with a customSqlValue
implementationas of 6.0, in favor of standardServletException
nesting
-
FieldDescriptionUse
ClassReader.readByte(int)
and the other read methods instead. This field will eventually be deleted.as of Spring 3.0: If you are using mixed autowiring strategies, prefer annotation-based autowiring for clearer demarcation of autowiring needs.as of Spring 3.0: If you are using mixed autowiring strategies, use annotation-based autowiring for clearer demarcation of autowiring needs.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 Stringsas of 5.2.6 since theMergedAnnotations
model always ignores lang annotations according to theAnnotationFilter.PLAIN
filter (for efficiency reasons)as of 5.3.16 along withAsyncTaskExecutor.execute(Runnable, long)
as of 5.3.16 along withAsyncTaskExecutor.execute(Runnable, long)
as of 6.0.3, in favor ofMediaType.APPLICATION_GRAPHQL_RESPONSE
as of 6.0.3, in favor ofMediaType.APPLICATION_GRAPHQL_RESPONSE_VALUE
as of 5.2 in favor ofMediaType.APPLICATION_JSON
since major browsers like Chrome now comply with the specification and interpret correctly UTF-8 special characters without requiring acharset=UTF-8
parameter.as of 5.2 in favor ofMediaType.APPLICATION_JSON_VALUE
since major browsers like Chrome now comply with the specification and interpret correctly UTF-8 special characters without requiring acharset=UTF-8
parameter.as of 5.2 in favor ofMediaType.APPLICATION_PROBLEM_JSON
since major browsers like Chrome now comply with the specification and interpret correctly UTF-8 special characters without requiring acharset=UTF-8
parameter.as of 5.2 in favor ofMediaType.APPLICATION_PROBLEM_JSON_VALUE
since major browsers like Chrome now comply with the specification and interpret correctly UTF-8 special characters without requiring acharset=UTF-8
parameter.as of 5.3, see notice onMediaType.APPLICATION_STREAM_JSON_VALUE
.as of 5.3 since it originates from the W3C Activity Streams specification which has a more specific purpose and has been since replaced with a different mime type. UseMediaType.APPLICATION_NDJSON
as a replacement or any other line-delimited JSON format (e.g. JSON Lines, JSON Text Sequences).As of 6.0, with no direct replacementAs of 6.0, with no direct replacementas of 6.1, in favor of the"autodetect" flag
as of 6.1, in favor of the"autodetect" flag
as of 6.1, in favor of the"autodetect" flag
as of 6.1, in favor of the"autodetect" flag
As of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 5.3 in favor ofUrlPathHelper.PATH_ATTRIBUTE
andServletRequestPathUtils.PATH_ATTRIBUTE
. To access the cached path used for request mapping, useServletRequestPathUtils.getCachedPathValue(ServletRequest)
.as of 6.0, with no direct replacement
-
MethodDescriptionin favor of
LogFactory.getLog(Class)
/LogFactory.getLog(String)
in favor ofLogFactory.getLog(Class)
in favor ofLogFactory.getLog(String)
this method is superseded byClassWriter.newHandle(int, String, String, String, boolean)
.as of Spring 5.0, following the deprecation ofClass.newInstance()
in JDK 9as of 6.1, in favor of implicit post-processing throughAutowireCapableBeanFactory.initializeBean(Object, String)
as of 6.1, in favor of implicit post-processing throughAutowireCapableBeanFactory.initializeBean(Object, String)
as of 6.1, in favor ofAutowireCapableBeanFactory.createBean(Class)
as of 6.2, in favor of lenient singleton locking (with this method returning an arbitrary object to lock on)Only to keep backward compatibility.as of 5.2.2, in favor ofAbstractResourceBasedMessageSource.getDefaultLocale()
as of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2 since it is superseded by theMergedAnnotations
APIas of 5.2, please implementDecoder.decode(DataBuffer, ResolvableType, MimeType, Map)
insteadas of 5.1 in favor ofEnvironment.acceptsProfiles(Profiles)
orEnvironment.matchesProfiles(String...)
since 5.2 in favor ofmethodParameter.withContainingClass(implementationClass).getParameterType()
as of 6.0, in favor ofDataBuffer.toByteBuffer(ByteBuffer)
,DataBuffer.readableByteBuffers()
, orDataBuffer.writableByteBuffers()
.as of 6.0, in favor ofDataBuffer.toByteBuffer(int, ByteBuffer, int, int)
,DataBuffer.readableByteBuffers()
, orDataBuffer.writableByteBuffers()
.as of 6.0, in favor ofDataBuffer.ensureWritable(int)
, which has different semanticssince 6.0, in favor ofDataBuffer.ensureWritable(int)
as of 6.0, in favor ofDataBuffer.split(int)
, which has different semanticsas of 6.0, in favor ofDataBuffer.split(int)
, which has different semanticsas of 6.0.5, in favor ofDataBuffer.toByteBuffer(ByteBuffer)
as of 6.0.5, in favor ofDataBuffer.toByteBuffer(int, ByteBuffer, int, int)
as of 6.0, in favor ofDataBufferFactory.allocateBuffer(int)
as of 6.0 in favor ofSpringFactoriesLoader.load(Class, ArgumentResolver, FailureHandler)
since 5.2 in favor of retaining the original MethodParameter and usingMethodParameter.nested(Integer)
if nesting is requiredas of 5.0, in favor ofMethodParameter.forExecutable(java.lang.reflect.Executable, int)
since 5.2 in favor ofMethodParameter.nested(Integer)
since 5.2 in favor ofMethodParameter.withTypeIndex(int)
as of 6.0, in favor of custom exception messages with selective inclusion of cause messagesin favor ofAsyncTaskExecutor.submitCompletable(Runnable)
in favor ofAsyncTaskExecutor.submitCompletable(Callable)
as of 5.3.16 since the common executors do not support start timeoutsas of 6.2 with no replacement; to be removed in 7.0as of 6.2 with no replacement; to be removed in 7.0as of 6.2 with no replacement; to be removed in 7.0as of 6.2 with no replacement; to be removed in 7.0org.springframework.http.client.HttpComponentsClientHttpRequestFactory.setBufferRequestBody(boolean) since 6.1 requests are never buffered, as if this property isfalse
since 6.1 requests are never buffered, as if this property isfalse
as of 6.1 requests are always streamed, as if this property istrue
as of 5.1.13, useCodecConfigurer.CustomCodecs.register(Object)
orCodecConfigurer.CustomCodecs.registerWithDefaultConfig(Object)
instead.as of 5.1.13, useCodecConfigurer.CustomCodecs.register(Object)
orCodecConfigurer.CustomCodecs.registerWithDefaultConfig(Object)
instead.as of 5.1.13, useCodecConfigurer.CustomCodecs.register(Object)
orCodecConfigurer.CustomCodecs.registerWithDefaultConfig(Object)
instead.as of 5.1.13, useCodecConfigurer.CustomCodecs.register(Object)
orCodecConfigurer.CustomCodecs.registerWithDefaultConfig(Object)
instead.since 6.1, in favor ofResourceHttpMessageWriter.addDefaultHeaders(ReactiveHttpOutputMessage, Resource, MediaType, Map)
, for removal = 6.2since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.since 5.2.3 as per RFC 6266, Appendix B, to be removed in a future release.as of 6.2 in favor ofHttpHeaders(MultiValueMap)
.as of 5.3, in favor of invokingHttpStatus.series()
directlyAs of 6.0, with no direct replacementAs of 6.0, in favor ofMimeTypeUtils.sortBySpecificity(List)
As of 6.0, in favor ofMimeTypeUtils.sortBySpecificity(List)
as of 6.0, in favor ofResponseEntity.getStatusCode()
; scheduled for removal in 7.0originally introduced for Undertow to stop write notifications when no data is available, but deprecated as of 5.0.6 since constant switching on every requested item causes a significant slowdown.as of 6.0, in favor ofServerHttpResponse.getStatusCode()
as of 5.3, in favor ofJdbcOperations.query(String, ResultSetExtractor, Object...)
as of 5.3, in favor ofJdbcOperations.query(String, RowCallbackHandler, Object...)
as of 5.3, in favor ofJdbcOperations.query(String, RowMapper, Object...)
as of 5.3, in favor ofJdbcOperations.queryForList(String, Class, Object...)
as of 5.3, in favor ofJdbcOperations.queryForObject(String, Class, Object...)
as of 5.3, in favor ofJdbcOperations.queryForObject(String, RowMapper, Object...)
as of 5.1.11, in favor ofDataSourceUtils.resetConnectionAfterTransaction(Connection, Integer, boolean)
as of 5.3.29, in favor ofSQLWarningException.getSQLWarning()
as of 5.3, in favor of the JDBC 4.0 connection validationas of 5.2.9, in favor ofJdbcUtils.extractDatabaseMetaData(DataSource, DatabaseMetaDataCallback)
with a lambda expression or method reference and a generically typed resultas of 6.1, in favor of the"autodetect" flag
as of 6.1, in favor of the"autodetect" flag
as of 6.0, in favor ofAsyncHandlerMethodReturnValueHandler.toCompletableFuture(Object, MethodParameter)
as of 5.3 in favor ofRSocketRequester.Builder.transport(ClientTransport)
as of 5.3 in favor ofRSocketRequester.Builder.tcp(String, int)
as of 5.3 in favor ofRSocketRequester.Builder.websocket(URI)
as of 6.0, in favor ofConnectionHandlingStompSession.getSession()
as of 6.0, in favor ofReactorNettyTcpStompClient.connectAsync(StompHeaders, StompSessionHandler)
as of 6.0, in favor ofReactorNettyTcpStompClient.connectAsync(StompSessionHandler)
as of 6.0, in favor ofTcpConnection.sendAsync(Message)
as of 6.0, in favor ofTcpOperations.connectAsync(TcpConnectionHandler)
as of 6.0, in favor ofTcpOperations.connectAsync(TcpConnectionHandler, ReconnectStrategy)
as of 6.0, in favor ofTcpOperations.shutdownAsync()
as of Spring Framework 6.0 in favor ofMockServerHttpRequest.method(HttpMethod, String, Object...)
as of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas of 5.0.4, in favor of a customHibernateCallback
lambda code block passed to the generalHibernateOperations.execute(org.springframework.orm.hibernate5.HibernateCallback<T>)
methodas 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 onJpaTransactionManager
.as of 5.3.9, in favor of directThreadPoolTaskScheduler.getScheduledThreadPoolExecutor()
accessas of 6.0, in favor ofIntervalTask.getInitialDelayDuration()
as of 6.0, in favor ofIntervalTask.getIntervalDuration()
as of 6.0, in favor ofScheduledTaskRegistrar.addFixedDelayTask(Runnable, Duration)
as of 6.0, in favor ofScheduledTaskRegistrar.addFixedRateTask(Runnable, Duration)
as of 6.0, in favor onPeriodicTrigger.getInitialDelayDuration()
as of 6.0, in favor onPeriodicTrigger.getPeriodDuration()
as of 6.0, with no direct replacementas of 6.0, in favor ofPeriodicTrigger.setInitialDelay(Duration)
as of 6.0, in favor ofSimpleTriggerContext.update(Instant, Instant, Instant)
as of 6.0, in favor ofTaskScheduler.schedule(Runnable, Instant)
as of 6.0, in favor ofTaskScheduler.scheduleAtFixedRate(Runnable, Duration)
as of 6.0, in favor ofTaskScheduler.scheduleAtFixedRate(Runnable, Instant, Duration)
as of 6.0, in favor ofTaskScheduler.scheduleWithFixedDelay(Runnable, Duration)
as of 6.0, in favor ofTaskScheduler.scheduleWithFixedDelay(Runnable, Instant, Duration)
as of 6.0, in favor ofTrigger.nextExecution(TriggerContext)
as of 6.0, in favor onTriggerContext.lastActualExecution()
as of 6.0, in favor onTriggerContext.lastCompletion()
as of 6.0, in favor onTriggerContext.lastScheduledExecution()
as of Spring Framework 6.0, in favor of methods defined in theSmartContextLoader
SPIas of Spring Framework 6.0, in favor of methods defined in theSmartContextLoader
SPIsince 6.1 in favor ofMergedContextConfiguration.getPropertySourceDescriptors()
as of Spring Framework 6.0, in favor ofAbstractGenericContextLoader.loadContext(MergedContextConfiguration)
in favor ofJsonPathAssertions.value(Class, Consumer)
in favor ofJsonPathAssertions.value(Class, Matcher)
in favor of callingString.formatted(Object...)
upfrontas of 5.1.13 in favor ofWebTestClient.Builder.codecs(Consumer)
as of Spring Framework 5.2 in favor ofWebTestClient.RequestBodySpec.bodyValue(Object)
as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
in favor ofStatusResultMatchers.isEarlyHints()
matching the deprecation ofHttpStatus.DESTINATION_LOCKED
matching the deprecation ofHttpStatus.INSUFFICIENT_SPACE_ON_RESOURCE
matching the deprecation ofHttpStatus.METHOD_FAILURE
in favor ofStatusResultMatchers.isFound()
matching the deprecation ofHttpStatus.REQUEST_ENTITY_TOO_LARGE
matching the deprecation ofHttpStatus.REQUEST_URI_TOO_LONG
matching the deprecation ofHttpStatus.USE_PROXY
as of Spring Framework 5.3.10, in favor ofResultActions.andExpectAll(ResultMatcher...)
as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
as of 6.2, in favor ofTransactionAspectSupport.determineTransactionManager(TransactionAttribute, Class)
as of 5.2, in favor of custom (possibly narrower) checks such as for a Spring AOP proxyas of 5.2, in favor of custom (possibly narrower) checks or simply a check for containingClassUtils.CGLIB_CLASS_SEPARATOR
as of 5.2, in favor of custom (possibly narrower) checks or simply a check for containingClassUtils.CGLIB_CLASS_SEPARATOR
as of 6.0, in favor ofCompletableFuture.whenComplete(BiConsumer)
as of 6.0, in favor ofCompletableFuture.whenComplete(BiConsumer)
in favor ofConcurrentLruCache.capacity()
as of 6.0.as of 6.1 in favor ofArrays.hashCode(boolean[])
as of 6.1 in favor ofArrays.hashCode(byte[])
as of 6.1 in favor ofArrays.hashCode(char[])
as of 6.1 in favor ofArrays.hashCode(double[])
as of 6.1 in favor ofArrays.hashCode(float[])
as of 6.1 in favor ofArrays.hashCode(int[])
as of 6.1 in favor ofArrays.hashCode(long[])
as of 6.1 in favor ofArrays.hashCode(short[])
as of 6.1 in favor ofArrays.hashCode(Object[])
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.
as of 6.1, in favor ofStopWatch.lastTaskInfo()
as of 6.1, in favor ofStopWatch.lastTaskInfo()
as of 6.1, in favor ofStopWatch.lastTaskInfo()
as of 6.1, in favor ofStopWatch.lastTaskInfo()
as of 6.0 in favor ofInputStream.nullInputStream()
as of 5.3, in favor ofStringUtils.hasLength(String)
andStringUtils.hasText(String)
(orObjectUtils.isEmpty(Object)
)since 6.0, in favor ofString.stripLeading()
since 6.0, in favor ofString.stripTrailing()
since 6.0, in favor ofString.strip()
as of 5.2.4. See class-level note on the deprecation of path extension config options. As there is no replacement for this method, in 5.2.x it is necessary to set it tofalse
. In 5.3 the default changes tofalse
and use of this property becomes unnecessary.as of 5.2.4. See class-level note on the deprecation of path extension config options.as of 5.0, in favor ofContentNegotiationManagerFactoryBean.setUseRegisteredExtensionsOnly(boolean)
, which has reverse behavior.as of 5.0, in favor ofAbstractMappingContentNegotiationStrategy.setUseRegisteredExtensionsOnly(boolean)
.in favor of usingBindErrorUtils
andBindException.getAllErrors()
, to be removed in 6.2in favor ofBindErrorUtils
, to be removed in 6.2in favor of usingBindErrorUtils
andBindException.getAllErrors()
, to be removed in 6.2in favor of usingBindErrorUtils
andWebExchangeBindException.getAllErrors()
, to be removed in 6.2as of 6.0, in favor ofRestClientResponseException.getStatusCode()
as of 6.0, in favor ofUnknownContentTypeException.getStatusCode()
as of 5.2, same-origin checks are performed directly byCorsUtils.isCorsRequest(org.springframework.http.server.reactive.ServerHttpRequest)
as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper)
, if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean)
.as of 5.3 in favor ofUrlPathHelper.PATH_ATTRIBUTE
.as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper)
, if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean)
.as of 5.3 in favor of usingUrlBasedCorsConfigurationSource.setUrlPathHelper(UrlPathHelper)
, if at all. For further details, please seeUrlBasedCorsConfigurationSource.setAllowInitLookupPath(boolean)
.as of 6.0 without a replacement; once removed, the default model will always be ignored on redirectas of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
As of Spring Framework 5.2, in favor ofBodyInserters.fromValue(Object)
in favor ofClientRequest.create(HttpMethod, URI)
as of 5.3 in favor of the instance basedClientResponse.mutate()
.as of Spring 5.1 in favor of usingHttpHeaders.setBasicAuth(String, String)
while building the request.in favor ofWebClientAdapter.create(WebClient)
aligning with other adapter implementations; to be removed in 6.2.as of 5.1.13 in favor ofWebClient.Builder.codecs(Consumer)
as of Spring Framework 5.2 in favor ofWebClient.RequestBodySpec.bodyValue(Object)
in 5.3.2 to be removed soon after; this method cannot provide context to downstream (nested or subsequent) requests and is of limited value.since 5.3 due to the possibility to leak memory and/or connections; please, useWebClient.RequestHeadersSpec.exchangeToMono(Function)
,WebClient.RequestHeadersSpec.exchangeToFlux(Function)
; consider also usingWebClient.RequestHeadersSpec.retrieve()
which provides access to the response status and headers viaResponseEntity
along with error status handling.as of 6.0, in favor ofWebClientResponseException.getStatusCode()
as of 6.0, in favor ofServerRequest.method()
as of 5.3, in favor onServerRequest.requestPath()
as of Spring Framework 5.2 in favor ofServerResponse.BodyBuilder.bodyValue(Object)
as of 6.0, in favor ofServerResponse.statusCode()
as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
since 6.1, in favor ofFreeMarkerView.lookupTemplate(Locale)
, to be removed in 6.2as of 5.3 in favor ofReactorNettyWebSocketClient.getWebsocketClientSpec()
as of 5.3 in favor ofReactorNettyWebSocketClient.getWebsocketClientSpec()
as of 5.3 in favor of providing a supplier ofWebsocketClientSpec.Builder
with a constructor argumentas of 5.3 in favor of providing a supplier ofWebsocketClientSpec.Builder
with a constructor argumentas of 5.3 in favor of comparing codes directlyas of 5.2.6 in favor ofReactorNettyRequestUpgradeStrategy.getWebsocketServerSpec()
as of 5.2.6 in favor ofReactorNettyRequestUpgradeStrategy.getWebsocketServerSpec()
as of 5.2.6 in favor of providing a supplier ofWebsocketServerSpec.Builder
with a constructor argumentas of 5.2.6 in favor of providing a supplier ofWebsocketServerSpec.Builder
with a constructor argumentas of 6.0, in favor ofResponseStatusExceptionHandler.determineStatus(Throwable)
as of 6.0 in favor ofMethodNotAllowedException.getHeaders()
as of 6.0 in favor ofNotAcceptableStatusException.getHeaders()
as of 6.0 in favor ofResponseStatusException.getHeaders()
as of 6.0 in favor ofUnsupportedMediaTypeStatusException.getHeaders()
in favor ofReactiveHttpRequestValues.Builder.addRequestPartPublisher(java.lang.String, P, org.springframework.core.ParameterizedTypeReference<T>)
; to be removed in 6.2in favour ofHttpRequestValues.Builder.createRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)
to be removed in 6.2.in favor ofReactiveHttpRequestValues.Builder.setBodyPublisher(P, org.springframework.core.ParameterizedTypeReference<T>)
; to be removed in 6.2in favor ofReactiveHttpRequestValues.getBodyPublisher()
; to be removed in 6.2in favor ofReactiveHttpRequestValues.getBodyPublisherElementType()
; to be removed in 6.2in favor ofHttpServiceProxyFactory.builderFor(HttpExchangeAdapter)
; to be removed in 6.2.in favor of setting the same directly on theHttpExchangeAdapter
in favor ofHttpServiceProxyFactory.Builder.exchangeAdapter(HttpExchangeAdapter)
; to be removed in 6.2in favor of setting the same directly on theHttpExchangeAdapter
as of 5.2.4. See deprecation note onContentNegotiationManagerFactoryBean.setFavorPathExtension(boolean)
.as of 5.2.4. See deprecation note onContentNegotiationManagerFactoryBean.setIgnoreUnknownPathExtensions(boolean)
.as of 5.0, in favor ofContentNegotiationConfigurer.useRegisteredExtensionsOnly(boolean)
which has reverse behavioras of 5.2.4, see deprecation note onPathMatchConfigurer.setUseRegisteredSuffixPatternMatch(Boolean)
.as of 5.2.4, see deprecation note onPathMatchConfigurer.setUseSuffixPatternMatch(Boolean)
.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options. As there is no replacement for this method, in 5.2.x it is necessary to set it tofalse
. In 5.3 the default changes tofalse
and use of this property becomes unnecessary.as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
as of 6.1 this property is set totrue
by default, and should not need to be customized; in effect,DispatcherServlet
should always raiseNoHandlerFoundException
and allow it to be handled through aHandlerExceptionResolver
.in favor ofServerRequest.method()
as of 5.3, in favor onServerRequest.requestPath()
as of 6.0, in favor ofServerResponse.statusCode()
as of 6.0, in favor of usingAbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)
as of 6.0, in favor of usingAbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)
as of 6.0, in favor of usingAbstractHandlerMapping.setUrlPathHelper(UrlPathHelper)
as of 5.3 in favor of providing non-pattern mappings viaAbstractHandlerMethodMapping.getDirectPaths(Object)
insteadas of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
since 6.1 in favor ofMappedInterceptor.getIncludePathPatterns()
as of 5.3 in favor ofMappedInterceptor.matches(HttpServletRequest)
as of 5.3.9 along withLastModified
.org.springframework.web.servlet.i18n.CookieLocaleResolver.determineDefaultLocale(HttpServletRequest) as of 6.0, in favor ofCookieLocaleResolver.setDefaultLocaleFunction(Function)
as of 6.0, in favor ofCookieLocaleResolver.setDefaultTimeZoneFunction(Function)
as of 6.0 in favor ofCookieLocaleResolver.setCookieMaxAge(Duration)
as of 6.0 in favor ofCookieLocaleResolver(String)
as of 6.0, in favor ofSessionLocaleResolver.setDefaultLocaleFunction(Function)
as of 6.0, in favor ofSessionLocaleResolver.setDefaultTimeZoneFunction(Function)
as of 5.3.9 along withLastModified
.as of 6.0 without a replacement; once removed, the default model will always be ignored on redirectas of 5.2.4. See class-level note on the deprecation of path extension config options.as of 5.2.4. See class level note on the deprecation of path extension config options.as of 5.2.4. See class level note on the deprecation of path extension config options. As there is no replacement for this method, in 5.2.x it is necessary to set it tofalse
. In 5.3 the default changes tofalse
and use of this property becomes unnecessary.as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
as of 5.2.4. See deprecation notice onRequestMappingHandlerMapping.setUseRegisteredSuffixPatternMatch(boolean)
.as of 5.2.4. See deprecation notice onRequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)
.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
; this method always returnsUrlPathHelper.defaultInstance
.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.as of 5.2.4. See deprecation note onRequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)
.as of 6.0, seePathPatternParser.setMatchOptionalTrailingSeparator(boolean)
as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.as of 5.2.4. See deprecation note onRequestMappingHandlerMapping.setUseSuffixPatternMatch(boolean)
.as of 6.0 together withRequestMappingInfo.BuilderConfiguration.setTrailingSlashMatch(boolean)
as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
as of 5.3, the path is resolved externally and obtained withServletRequestPathUtils.getCachedPathValue(ServletRequest)
as of 5.2.4org.springframework.web.servlet.resource.ResourceHttpRequestHandler.initContentNegotiationStrategy()as of 5.2.4 this method returnsnull
, and if a subclass returns an actual instance, the instance is used only as a source of media type mappings, if it contains any. Please, useResourceHttpRequestHandler.setMediaTypes(Map)
instead, or if you need to change behavior, you can overrideResourceHttpRequestHandler.getMediaType(HttpServletRequest, Resource)
.as of 5.2.4 in favor of usingResourceHttpRequestHandler.setMediaTypes(Map)
with mappings possibly obtained fromContentNegotiationManager.getMediaTypeMappings()
.as of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 6.0, with no direct replacementas of 4.2, since thelastModified
flag is effectively ignored, with a must-revalidate header only generated if explicitly configuredas of 6.0, in favor ofAbstractWebSocketClient.executeInternal(WebSocketHandler, HttpHeaders, URI, List, List, Map)
as of 6.0, in favor ofWebSocketClient.execute(WebSocketHandler, String, Object...)
as of 6.0, in favor ofWebSocketClient.execute(WebSocketHandler, WebSocketHttpHeaders, URI)
as of 6.0, in favor ofWebSocketStompClient.connectAsync(String, StompSessionHandler, Object...)
as of 6.0, in favor ofTransport.connectAsync(TransportRequest, WebSocketHandler)
as of 6.0 together withPathPatternParser.setMatchOptionalTrailingSeparator(boolean)
.transparent support for trailing slashes is deprecated as of 6.0 in favor of configuring explicit redirects through a proxy, Servlet/web filter, or a controller.in favor ofForwardedHeaderUtils.adaptFromForwardedHeaders(java.net.URI, org.springframework.http.HttpHeaders)
; to be removed in 6.2in favor ofForwardedHeaderUtils.parseForwardedFor(java.net.URI, org.springframework.http.HttpHeaders, java.net.InetSocketAddress)
; to be removed in 6.2as of 5.3 in favor of usingUrlPathHelper.resolveAndCacheLookupPath(HttpServletRequest)
andUrlPathHelper.getResolvedLookupPath(ServletRequest)
.
-
ConstructorDescriptionas of 6.0.12 in favor of the builderthis constructor has been superseded by
Handle(int, String, String, String, boolean)
.as of 6.0.11, in favor of an extraRootBeanDefinition.setTargetType(ResolvableType)
callsince 5.2 in favor of the factory methodAnnotationMetadata.introspect(Class)
since 5.2 in favor of the factory methodAnnotationMetadata.introspect(Class)
. UseMergedAnnotation.asMap
fromStandardAnnotationMetadata.getAnnotations()
rather thanAnnotatedTypeMetadata.getAnnotationAttributes(String)
ifnestedAnnotationsAsMap
isfalse
since 5.2 in favor ofStandardAnnotationMetadata
since 5.2 in favor of obtaining instances viaAnnotationMetadata
as of Spring Framework 6.2, in favor ofIndexer(boolean, int, int, SpelNodeImpl)
as of Spring Framework 5.2.23 in favor of invokingOperatorMatches(ConcurrentMap, int, int, SpelNodeImpl...)
with a shared pattern cache insteadas of 5.2, in favor ofJettyClientHttpConnector(HttpClient, JettyResourceFactory)
as of 5.1, in favor ofHttpMessageNotReadableException(String, HttpInputMessage)
as of 5.1, in favor ofHttpMessageNotReadableException(String, Throwable, HttpInputMessage)
in favor ofConcurrentTaskExecutor(Executor)
with an externally provided Executorin favor ofConcurrentTaskScheduler(ScheduledExecutorService)
with an externally provided Executoras of 6.0, in favor onFixedDelayTask(Runnable, Duration, Duration)
as of 6.0, in favor onFixedRateTask(Runnable, Duration, Duration)
as of 6.0, in favor onIntervalTask(Runnable, Duration)
as of 6.0, in favor onIntervalTask(Runnable, Duration, Duration)
as of 6.0, in favor onPeriodicTrigger(Duration)
as of 6.0, in favor onPeriodicTrigger(Duration)
as of 6.0, in favor ofSimpleTriggerContext(Instant, Instant, Instant)
in favor of callingString.formatted(Object...)
upfrontas of 5.2.5, in favor ofTransactionAspectSupport.setTransactionAttributes(Properties)
as of 5.2.5, in favor ofTransactionInterceptor(TransactionManager, TransactionAttributeSource)
as of 6.0.12 since JTA 1.1+ requires implicit rollback-only setting in case of an exception thrown inbeforeCompletion
, so the regularSpringJtaSynchronizationAdapter(TransactionSynchronization)
constructor is sufficient for all scenariosas of 6.0.12 since JTA 1.1+ requires implicit rollback-only setting in case of an exception thrown inbeforeCompletion
, so the regularSpringJtaSynchronizationAdapter(TransactionSynchronization)
constructor is sufficient for all scenariosas of 6.2, in favor ofPropertyPlaceholderHelper(String, String, String, Character, boolean)
as of 6.0as of 6.0as of 6.1.2, in favor ofClientRequestObservationContext(ClientRequest.Builder)
as of 5.3.4 in favor usingRequestMappingInfo.Builder
viaRequestMappingInfo.paths(String...)
.as of 5.3.4 in favor usingRequestMappingInfo.Builder
viaRequestMappingInfo.paths(String...)
.since 5.3.4 in favor of using aRequestMappingInfo.Builder
viaRequestMappingInfo.mutate()
.as of 5.3.5 in favor ofHandshakeInfo(URI, HttpHeaders, MultiValueMap, Mono, String, InetSocketAddress, Map, String)
in favour ofHttpRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)
to be removed in 6.2.as of 5.3 in favor ofPatternsRequestCondition(String[], boolean, PathMatcher)
.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.as of 5.2.4. See class-level note inRequestMappingHandlerMapping
on the deprecation of path extension config options.as of 5.3 in favor usingRequestMappingInfo.Builder
viaRequestMappingInfo.paths(String...)
.as of 5.3 in favor usingRequestMappingInfo.Builder
viaRequestMappingInfo.paths(String...)
.since 5.3 in favor of usingRequestMappingInfo.addCustomCondition(RequestCondition)
.as of 6.0, in favor ofAbstractClientSockJsSession(TransportRequest, WebSocketHandler, CompletableFuture)
as of 6.0, in favor ofWebSocketClientSockJsSession(TransportRequest, WebSocketHandler, CompletableFuture)
as of 6.0, in favor ofXhrClientSockJsSession(TransportRequest, WebSocketHandler, XhrTransport, CompletableFuture)
-
Enum ConstantDescriptionin favor of
HttpStatus.EARLY_HINTS
which will be returned fromHttpStatus.valueOf(103)
in favor ofHttpStatus.FOUND
which will be returned fromHttpStatus.valueOf(302)
in favor ofHttpStatus.PAYLOAD_TOO_LARGE
which will be returned fromHttpStatus.valueOf(413)
in favor ofHttpStatus.URI_TOO_LONG
which will be returned fromHttpStatus.valueOf(414)
due to security concerns regarding in-band configuration of a proxy