Top For Removal Deprecated By Reference
Spring Framework 6.1.4

Deprecated API


Terminally Deprecated Item Summary

SinceTerminally Deprecated Item and Description
6.0.12
org.springframework.aot.hint.support.FilePatternResourceHintsRegistrar(List<String>
the file prefixes
filePrefixes
,
List<String>
the classpath locations
classpathLocations
,
List<String>
the file extensions (starting with a dot)
fileExtensions
)

as of 6.0.12 in favor of the builder

6.0.12
6.0.11

Returns:

a new BeanInstanceSupplier instance with the specified generator
org.springframework.beans.factory.aot.BeanInstanceSupplier.withGenerator
(ThrowingSupplier<T>
a ThrowingSupplier to instantiate the underlying bean
generator
)

in favor of withGenerator(ThrowingFunction)

6.0.10
org.springframework.cache.jcache.interceptor.JCacheOperationSourcePointcut

since 6.0.10, as it is not used by the framework anymore

6.1
org.springframework.context.index.CandidateComponentsIndex

as of 6.1, in favor of the AOT engine.

6.1
6.0.3
6.0.3
6.0
6.0
org.springframework.http.MediaType.SPECIFICITY_COMPARATOR

As of 6.0, with no direct replacement

6.0
org.springframework.http.MediaType.sortByQualityValue(List<MediaType>
the list of media types to be sorted
mediaTypes
)

As of 6.0, with no direct replacement

6.0
org.springframework.http.MediaType.sortBySpecificity(List<MediaType>
the list of media types to be sorted
mediaTypes
)

As of 6.0, in favor of MimeTypeUtils#sortBySpecificity(List)

6.0
org.springframework.http.client.AbstractClientHttpResponse

as of 6.0, with no direct replacement; scheduled for removal in 6.2

6.0

Returns:

the HTTP status as an integer value
org.springframework.http.client.ClientHttpResponse.getRawStatusCode
()

as of 6.0, in favor of getStatusCode(); scheduled for removal in 6.2

6.1
org.springframework.http.client.HttpComponentsClientHttpRequestFactory.setBufferRequestBody(boolean bufferRequestBody)

since 6.1 requests are never buffered, as if this property is false

6.1
6.1
org.springframework.http.client.OkHttp3ClientHttpRequestFactory

since 6.1, in favor of other ClientHttpRequestFactory implementations; scheduled for removal in 6.2

6.1
6.1
org.springframework.http.client.SimpleClientHttpRequestFactory.setBufferRequestBody(boolean bufferRequestBody)

since 6.1 requests are never buffered, as if this property is false

6.1
org.springframework.http.client.SimpleClientHttpRequestFactory.setOutputStreaming(boolean
if output streaming is enabled
outputStreaming
)

as of 6.1 requests are always streamed, as if this property is true

6.0.5
org.springframework.http.client.observation.ClientHttpObservationDocumentation.HighCardinalityKeyNames.CLIENT_NAME

in favor of LowCardinalityKeyNames#CLIENT_NAME; scheduled for removal in 6.2. This will be available both as a low and high cardinality key value.

6.1
6.1
org.springframework.transaction.reactive.GenericReactiveTransaction(Object transaction, boolean newTransaction, boolean newSynchronization, boolean readOnly, boolean debug, Object suspendedResources)

6.1
org.springframework.transaction.support.DefaultTransactionStatus(Object transaction, boolean newTransaction, boolean newSynchronization, boolean readOnly, boolean debug, Object suspendedResources)

6.0.5
org.springframework.util.Base64Utils

as of Spring Framework 6.0.5 in favor of Base64; scheduled for removal in 6.2

6.0
org.springframework.util.MimeType.SpecificityComparator<
the type of mime types that may be compared by this comparator
T extends MimeType
>

As of 6.0, with no direct replacement

6.0
6.1.3
6.1
6.1
6.1

Returns:

a Map with errors as keys and resolved messages as values
org.springframework.web.bind.MethodArgumentNotValidException.resolveErrorMessages
(MessageSource messageSource, Locale locale)

in favor of using BindErrorUtils and getAllErrors(), to be removed in 6.2

6.1
org.springframework.web.bind.MissingServletRequestParameterException(String
the name of the missing parameter
parameterName
,
String
the expected type of the missing parameter
parameterType
,
boolean
whether the value became null after conversion
missingAfterConversion
)

in favor of MissingServletRequestParameterException(String, MethodParameter, boolean)

6.1

Returns:

a Map with errors as key and resolves messages as value
org.springframework.web.bind.support.WebExchangeBindException.resolveErrorMessages
(MessageSource messageSource, Locale locale)

in favor of using BindErrorUtils and getAllErrors(), to be removed in 6.2

6.1
6.0.6

Returns:

an Optional with the exchange if found
org.springframework.web.filter.reactive.ServerWebExchangeContextFilter.get
(Context
the context to get the exchange from
context
)

in favor of using getExchange(ContextView) which accepts a ContextView instead of Context, reflecting the fact that the ContextView is needed only for reading.

6.0

Returns:

the new result or the same error if there is no exception handler
org.springframework.web.reactive.HandlerResult.applyExceptionHandler
(Throwable
the exception
failure
)

without a replacement; for internal invocation only, not used as of 6.0

6.0
6.0
6.0.5
org.springframework.web.reactive.function.client.ClientHttpObservationDocumentation.HighCardinalityKeyNames.CLIENT_NAME

in favor of LowCardinalityKeyNames#CLIENT_NAME; scheduled for removal in 6.2. This will be available both as a low and high cardinality key value.

6.1.2
6.1

Returns:

the created adapter instance
org.springframework.web.reactive.function.client.support.WebClientAdapter.forClient
(WebClient
the client to use
webClient
)

in favor of create(WebClient) aligning with other adapter implementations; to be removed in 6.2.

6.1

Returns:

the FreeMarker template to render
org.springframework.web.reactive.result.view.freemarker.FreeMarkerView.getTemplate
(Locale
the current locale
locale
)

since 6.1, in favor of lookupTemplate(Locale), to be removed in 6.2

6.1
6.1
6.1
6.1
6.1
6.1
6.1
6.1

Returns:

this same builder instance
org.springframework.web.service.invoker.HttpServiceProxyFactory.Builder.blockTimeout
(Duration
the timeout value
blockTimeout
)

in favor of setting the same directly on the HttpExchangeAdapter

6.1

Returns:

this same builder instance
org.springframework.web.service.invoker.HttpServiceProxyFactory.Builder.clientAdapter
(HttpClientAdapter
a client adapted to HttpClientAdapter
clientAdapter
)

in favor of exchangeAdapter(HttpExchangeAdapter); to be removed in 6.2

6.1

Returns:

this same builder instance
org.springframework.web.service.invoker.HttpServiceProxyFactory.Builder.reactiveAdapterRegistry
(ReactiveAdapterRegistry registry)

in favor of setting the same directly on the HttpExchangeAdapter

6.1
6.1
org.springframework.web.servlet.DispatcherServlet.setThrowExceptionIfNoHandlerFound(boolean throwExceptionIfNoHandlerFound)

as of 6.1 this property is set to true by default, and should not need to be customized; in effect, DispatcherServlet should always raise NoHandlerFoundException and allow it to be handled through a HandlerExceptionResolver.

6.1
6.0

Returns:

a ResponseEntity for the response to use, possibly null when the response is already committed
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler.handleBindException
(BindException
the exception to handle
ex
,
HttpHeaders
the headers to use for the response
headers
,
HttpStatusCode
the status code to use for the response
status
,
WebRequest
the current request
request
)

as of 6.0 since org.springframework.web.method.annotation.ModelAttributeMethodProcessor now raises the MethodArgumentNotValidException subclass instead.

6.0

Returns:

an empty ModelAndView indicating the exception was handled
org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.handleBindException
(BindException ex, HttpServletRequest
current HTTP request
request
,
HttpServletResponse
current HTTP response
response
,
Object
the executed handler
handler
)

as of 6.0 since org.springframework.web.method.annotation.ModelAttributeMethodProcessor now raises the MethodArgumentNotValidException subclass instead.

6.1

Returns:

the URI components of the URI
org.springframework.web.util.UriComponentsBuilder.fromHttpRequest
(HttpRequest
the source request
request
)

in favor of ForwardedHeaderUtils#adaptFromForwardedHeaders; to be removed in 6.2

6.1

Returns:

an InetSocketAddress with the extracted host and port, or null if the headers are not present.
org.springframework.web.util.UriComponentsBuilder.parseForwardedFor
(HttpRequest
a request with headers that may contain forwarded headers
request
,
InetSocketAddress
the current remoteAddress
remoteAddress
)

in favor of ForwardedHeaderUtils#parseForwardedFor; to be removed in 6.2