Remove deprecated web APIs

See gh-33809
This commit is contained in:
rstoyanchev
2025-01-15 13:02:20 +00:00
parent 83c020eea5
commit 4920086225
38 changed files with 65 additions and 1305 deletions

View File

@@ -43,7 +43,6 @@ import org.springframework.util.Assert;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MimeType;
import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
import org.springframework.web.util.UriComponentsBuilder;
/**
@@ -210,22 +209,6 @@ public final class MockServerHttpRequest extends AbstractServerHttpRequest {
return method(method, toUri(uri, vars));
}
/**
* Create a builder with a raw HTTP method value that is outside the
* range of {@link HttpMethod} enum values.
* @param httpMethod the HTTP methodValue value
* @param uri the URI template for target the URL
* @param vars variables to expand into the template
* @return the created builder
* @since 5.2.7
* @deprecated in favor of {@link #method(HttpMethod, String, Object...)}
*/
@Deprecated
public static BodyBuilder method(String httpMethod, String uri, @Nullable Object... vars) {
Assert.isTrue(StringUtils.hasText(httpMethod), "HTTP method is required.");
return new DefaultBodyBuilder(HttpMethod.valueOf(httpMethod), toUri(uri, vars));
}
private static URI toUri(String uri, @Nullable Object[] vars) {
return UriComponentsBuilder.fromUriString(uri).buildAndExpand(vars).encode().toUri();
}