|
52 | 52 | import org.springframework.http.RequestEntity; |
53 | 53 | import org.springframework.http.RequestEntity.UriTemplateRequestEntity; |
54 | 54 | import org.springframework.http.ResponseEntity; |
| 55 | +import org.springframework.test.web.servlet.client.RestTestClient; |
55 | 56 | import org.springframework.util.Assert; |
56 | 57 | import org.springframework.util.ObjectUtils; |
57 | 58 | import org.springframework.web.client.NoOpResponseErrorHandler; |
|
81 | 82 | * your test. If you need customizations (for example to adding additional message |
82 | 83 | * converters) use a {@link RestTemplateBuilder} {@code @Bean}. |
83 | 84 | * |
| 85 | + * @deprecated {@link RestTestClient} is considered successor. |
| 86 | + * |
84 | 87 | * @author Dave Syer |
85 | 88 | * @author Phillip Webb |
86 | 89 | * @author Andy Wilkinson |
@@ -1017,11 +1020,11 @@ private URI resolveUri(RequestEntity<?> entity) { |
1017 | 1020 | if (entity instanceof UriTemplateRequestEntity<?> templatedUriEntity) { |
1018 | 1021 | if (templatedUriEntity.getVars() != null) { |
1019 | 1022 | return this.restTemplate.getUriTemplateHandler() |
1020 | | - .expand(templatedUriEntity.getUriTemplate(), templatedUriEntity.getVars()); |
| 1023 | + .expand(templatedUriEntity.getUriTemplate(), templatedUriEntity.getVars()); |
1021 | 1024 | } |
1022 | 1025 | else if (templatedUriEntity.getVarsMap() != null) { |
1023 | 1026 | return this.restTemplate.getUriTemplateHandler() |
1024 | | - .expand(templatedUriEntity.getUriTemplate(), templatedUriEntity.getVarsMap()); |
| 1027 | + .expand(templatedUriEntity.getUriTemplate(), templatedUriEntity.getVarsMap()); |
1025 | 1028 | } |
1026 | 1029 | throw new IllegalStateException( |
1027 | 1030 | "No variables specified for URI template: " + templatedUriEntity.getUriTemplate()); |
@@ -1065,7 +1068,8 @@ public TlsSocketStrategy getTlsSocketStrategy(@Nullable SslBundle sslBundle) { |
1065 | 1068 | SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, trustStrategy).build(); |
1066 | 1069 | return new DefaultClientTlsStrategy(sslContext, SUPPORTED_PROTOCOLS, null, null, null); |
1067 | 1070 | } |
1068 | | - catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException ex) { |
| 1071 | + catch (KeyManagementException | NoSuchAlgorithmException | |
| 1072 | + KeyStoreException ex) { |
1069 | 1073 | throw new IllegalStateException(ex); |
1070 | 1074 | } |
1071 | 1075 | } |
|
0 commit comments