Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionas of 6.0, with no direct replacement; scheduled for removal in 6.2as of 6.0, in favor of
ClientHttpResponse.getStatusCode(); scheduled for removal in 6.2org.springframework.http.client.HttpComponentsClientHttpRequestFactory.setBufferRequestBody(boolean) since 6.1 requests are never buffered, as if this property isfalsein favor ofClientHttpObservationDocumentation.LowCardinalityKeyNames.CLIENT_NAME; scheduled for removal in 6.2. This will be available both as a low and high cardinality key value.since 6.1, in favor of otherClientHttpRequestFactoryimplementations; scheduled for removal in 6.2since 6.1 requests are never buffered, as if this property isfalseas of 6.1, this property is ignored with no direct replacement.since 6.1, in favor ofResourceHttpMessageWriter.addDefaultHeaders(ReactiveHttpOutputMessage, Resource, MediaType, Map), for removal = 6.2as of 6.0.3, in favor ofMediaType.APPLICATION_GRAPHQL_RESPONSEas of 6.0.3, in favor ofMediaType.APPLICATION_GRAPHQL_RESPONSE_VALUEAs 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 usingBindErrorUtilsandBindException.getAllErrors(), to be removed in 6.2in favor ofBindErrorUtils, to be removed in 6.2in favor of usingBindErrorUtilsandBindException.getAllErrors(), to be removed in 6.2in favor of usingBindErrorUtilsandWebExchangeBindException.getAllErrors(), to be removed in 6.2since 6.1 in favor ofWebHttpHandlerBuilder.in favor of usingServerWebExchangeContextFilter.getExchange(ContextView)which accepts aContextViewinstead ofContext, reflecting the fact that theContextViewis needed only for reading.in favor ofReactorHttpExchangeAdapterin 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 theHttpExchangeAdapterin favor ofHttpServiceProxyFactory.Builder.exchangeAdapter(HttpExchangeAdapter); to be removed in 6.2in favor of setting the same directly on theHttpExchangeAdapterin 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
-
Deprecated Interfaces
-
Deprecated ClassesClassDescriptionas of 6.0, with no direct replacement; scheduled for removal in 6.2since 6.1, in favor of other
ClientHttpRequestFactoryimplementations; scheduled for removal in 6.2since 6.1 due to a package change; useReactorResourceFactoryinstead.as of 5.2.4. See class-level note inContentNegotiationManagerFactoryBeanon the deprecation of path extension config options.as of 5.2.4. See class-level note inContentNegotiationManagerFactoryBeanon the deprecation of path extension config options.since 6.1 in favor ofWebHttpHandlerBuilder.as of 6.0 in favor ofResponseCookie
-
Deprecated Exceptions
-
Deprecated FieldsFieldDescriptionas of 6.0.3, in favor of
MediaType.APPLICATION_GRAPHQL_RESPONSEas of 6.0.3, in favor ofMediaType.APPLICATION_GRAPHQL_RESPONSE_VALUEas of 5.2 in favor ofMediaType.APPLICATION_JSONsince major browsers like Chrome now comply with the specification and interpret correctly UTF-8 special characters without requiring acharset=UTF-8parameter.as of 5.2 in favor ofMediaType.APPLICATION_JSON_VALUEsince major browsers like Chrome now comply with the specification and interpret correctly UTF-8 special characters without requiring acharset=UTF-8parameter.as of 5.2 in favor ofMediaType.APPLICATION_PROBLEM_JSONsince major browsers like Chrome now comply with the specification and interpret correctly UTF-8 special characters without requiring acharset=UTF-8parameter.as of 5.2 in favor ofMediaType.APPLICATION_PROBLEM_JSON_VALUEsince major browsers like Chrome now comply with the specification and interpret correctly UTF-8 special characters without requiring acharset=UTF-8parameter.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_NDJSONas 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 replacement
-
Deprecated MethodsMethodDescriptionas of 6.0, in favor of
ClientHttpResponse.getStatusCode(); scheduled for removal in 6.2org.springframework.http.client.HttpComponentsClientHttpRequestFactory.setBufferRequestBody(boolean) since 6.1 requests are never buffered, as if this property isfalsesince 6.1 requests are never buffered, as if this property isfalseas of 6.1, this property is ignored with no direct replacement.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 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.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 tofalseand 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 usingBindErrorUtilsandBindException.getAllErrors(), to be removed in 6.2in favor ofBindErrorUtils, to be removed in 6.2in favor of usingBindErrorUtilsandBindException.getAllErrors(), to be removed in 6.2in favor of usingBindErrorUtilsandWebExchangeBindException.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).in favor of usingServerWebExchangeContextFilter.getExchange(ContextView)which accepts aContextViewinstead ofContext, reflecting the fact that theContextViewis needed only for reading.as of 6.0 without a replacement; once removed, the default model will always be ignored on redirectas 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 theHttpExchangeAdapterin favor ofHttpServiceProxyFactory.Builder.exchangeAdapter(HttpExchangeAdapter); to be removed in 6.2in favor of setting the same directly on theHttpExchangeAdapteras 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).
-
Deprecated ConstructorsConstructorDescriptionas of 5.2, in favor of
JettyClientHttpConnector(HttpClient, JettyResourceFactory)as of 5.1, in favor ofHttpMessageNotReadableException(String, HttpInputMessage)as of 5.1, in favor ofHttpMessageNotReadableException(String, Throwable, HttpInputMessage)as of 6.0as of 6.0in favour ofHttpRequestValues(HttpMethod, URI, UriBuilderFactory, String, Map, HttpHeaders, MultiValueMap, Map, Object)to be removed in 6.2.
-
Deprecated Enum ConstantsEnum ConstantDescriptionin favor of
ClientHttpObservationDocumentation.LowCardinalityKeyNames.CLIENT_NAME; scheduled for removal in 6.2. This will be available both as a low and high cardinality key value.in favor ofHttpStatus.EARLY_HINTSwhich will be returned fromHttpStatus.valueOf(103)in favor ofHttpStatus.FOUNDwhich will be returned fromHttpStatus.valueOf(302)in favor ofHttpStatus.PAYLOAD_TOO_LARGEwhich will be returned fromHttpStatus.valueOf(413)in favor ofHttpStatus.URI_TOO_LONGwhich will be returned fromHttpStatus.valueOf(414)due to security concerns regarding in-band configuration of a proxy