Skip to content

Commit e9e19f5

Browse files
committed
Update references to HTTP service clients in docs
Closes gh-35522
1 parent 79738d9 commit e9e19f5

File tree

12 files changed

+44
-46
lines changed

12 files changed

+44
-46
lines changed

framework-docs/modules/ROOT/nav.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@
314314
*** xref:web/webflux-webclient/client-context.adoc[]
315315
*** xref:web/webflux-webclient/client-synchronous.adoc[]
316316
*** xref:web/webflux-webclient/client-testing.adoc[]
317-
** xref:web/webflux-http-interface-client.adoc[]
317+
** xref:web/webflux-http-service-client.adoc[]
318318
** xref:web/webflux-websocket.adoc[]
319319
** xref:web/webflux-test.adoc[]
320320
** xref:rsocket.adoc[]

framework-docs/modules/ROOT/pages/integration/rest-clients.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The Spring Framework provides the following choices for making calls to REST end
66
* xref:integration/rest-clients.adoc#rest-restclient[`RestClient`] -- synchronous client with a fluent API
77
* xref:integration/rest-clients.adoc#rest-webclient[`WebClient`] -- non-blocking, reactive client with fluent API
88
* xref:integration/rest-clients.adoc#rest-resttemplate[`RestTemplate`] -- synchronous client with template method API
9-
* xref:integration/rest-clients.adoc#rest-http-interface[HTTP Interface Clients] -- annotated interface backed by generated proxy
9+
* xref:integration/rest-clients.adoc#rest-http-service-client[HTTP Service Clients] -- annotated interface backed by generated proxy
1010

1111

1212
[[rest-restclient]]
@@ -855,8 +855,8 @@ It can be used to migrate from the latter to the former.
855855
|===
856856

857857

858-
[[rest-http-interface]]
859-
== HTTP Interface Clients
858+
[[rest-http-service-client]]
859+
== HTTP Service Clients
860860

861861
You can define an HTTP Service as a Java interface with `@HttpExchange` methods, and use
862862
`HttpServiceProxyFactory` to create a client proxy from it for remote access over HTTP via
@@ -928,7 +928,7 @@ Now, you're ready to create client proxies:
928928
// Use service methods for remote calls...
929929
----
930930

931-
[[rest-http-interface-method-parameters]]
931+
[[rest-http-service-client-method-parameters]]
932932
=== Method Parameters
933933

934934
`@HttpExchange` methods support flexible method signatures with the following inputs:
@@ -1000,13 +1000,13 @@ parameter annotation) is set to `false`, or the parameter is marked optional as
10001000
`StreamingHttpOutputMessage.Body` that allows sending the request body by writing to an
10011001
`OutputStream`.
10021002

1003-
[[rest-http-interface.custom-resolver]]
1003+
[[rest-http-service-client.custom-resolver]]
10041004
=== Custom Arguments
10051005

10061006
You can configure a custom `HttpServiceArgumentResolver`. The example interface below
10071007
uses a custom `Search` method parameter type:
10081008

1009-
include-code::./CustomHttpServiceArgumentResolver[tag=httpinterface,indent=0]
1009+
include-code::./CustomHttpServiceArgumentResolver[tag=httpserviceclient,indent=0]
10101010

10111011
A custom argument resolver could be implemented like this:
10121012

@@ -1021,7 +1021,7 @@ the use of more fine-grained method parameters for individual parts of the reque
10211021

10221022

10231023

1024-
[[rest-http-interface-return-values]]
1024+
[[rest-http-service-client-return-values]]
10251025
=== Return Values
10261026

10271027
The supported return values depend on the underlying client.
@@ -1097,7 +1097,7 @@ underlying HTTP client, which operates at a lower level and provides more contro
10971097
`InputStream` or `ResponseEntity<InputStream>` that provides access to the raw response
10981098
body content.
10991099

1100-
[[rest-http-interface-exceptions]]
1100+
[[rest-http-service-client-exceptions]]
11011101
=== Error Handling
11021102

11031103
To customize error handling for HTTP Service client proxies, you can configure the
@@ -1134,7 +1134,7 @@ documentation for each client, as well as the Javadoc of `defaultStatusHandler`
11341134

11351135

11361136

1137-
[[rest-http-interface-adapter-decorator]]
1137+
[[rest-http-service-client-adapter-decorator]]
11381138
=== Decorating the Adapter
11391139

11401140
`HttpExchangeAdapter` and `ReactorHttpExchangeAdapter` are contracts that decouple HTTP
@@ -1162,8 +1162,8 @@ built-in decorators to suppress 404 exceptions and return a `ResponseEntity` wit
11621162

11631163

11641164

1165-
[[rest-http-interface-group-config]]
1166-
=== HTTP Interface Groups
1165+
[[rest-http-service-client-group-config]]
1166+
=== HTTP Service Groups
11671167

11681168
It's trivial to create client proxies with `HttpServiceProxyFactory`, but to have them
11691169
declared as beans leads to repetitive configuration. You may also have multiple
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
[[webflux-http-interface-client]]
2-
= HTTP Interface Client
1+
[[webflux-http-service-client]]
2+
= HTTP Service Client
33

44
The Spring Frameworks lets you define an HTTP service as a Java interface with HTTP
55
exchange methods. You can then generate a proxy that implements this interface and
66
performs the exchanges. This helps to simplify HTTP remote access and provides additional
77
flexibility for to choose an API style such as synchronous or reactive.
88

9-
See xref:integration/rest-clients.adoc#rest-http-interface[REST Endpoints] for details.
9+
See xref:integration/rest-clients.adoc#rest-http-service-client[HTTP Service Clients] for details.

framework-docs/modules/ROOT/pages/web/webflux-versioning.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ to annotated controller methods with an API version
1717
to functional endpoints with an API version
1818

1919
Client support for API versioning is available also in `RestClient`, `WebClient`, and
20-
xref:integration/rest-clients.adoc#rest-http-interface[HTTP Service] clients, as well as
20+
xref:integration/rest-clients.adoc#rest-http-service-client[HTTP Service] clients, as well as
2121
for testing in `WebTestClient`.
2222

2323

framework-docs/modules/ROOT/pages/web/webflux/controller/ann-requestmapping.adoc

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -629,17 +629,16 @@ Kotlin::
629629
== `@HttpExchange`
630630
[.small]#xref:web/webmvc/mvc-controller/ann-requestmapping.adoc#mvc-ann-httpexchange-annotation[See equivalent in the Servlet stack]#
631631

632-
While the main purpose of `@HttpExchange` is to abstract HTTP client code with a
633-
generated proxy, the
634-
xref:integration/rest-clients.adoc#rest-http-interface[HTTP Interface] on which
635-
such annotations are placed is a contract neutral to client vs server use.
636-
In addition to simplifying client code, there are also cases where an HTTP Interface
637-
may be a convenient way for servers to expose their API for client access. This leads
638-
to increased coupling between client and server and is often not a good choice,
639-
especially for public API's, but may be exactly the goal for an internal API.
640-
It is an approach commonly used in Spring Cloud, and it is why `@HttpExchange` is
641-
supported as an alternative to `@RequestMapping` for server side handling in
642-
controller classes.
632+
While the main purpose of `@HttpExchange` is for an HTTP Service
633+
xref:integration/rest-clients.adoc#rest-http-service-client[client with a generated proxy],
634+
the HTTP Service interface on which such annotations are placed is a contract neutral
635+
to client vs server use. In addition to simplifying client code, there are also cases
636+
where an HTTP Service interface may be a convenient way for servers to expose their
637+
API for client access. This leads to increased coupling between client and server and
638+
is often not a good choice, especially for public API's, but may be exactly the goal
639+
for an internal API. It is an approach commonly used in Spring Cloud, and it is why
640+
`@HttpExchange` is supported as an alternative to `@RequestMapping` for server side
641+
handling in controller classes.
643642

644643
For example:
645644

@@ -710,5 +709,5 @@ path, and content types.
710709
For method parameters and returns values, generally, `@HttpExchange` supports a
711710
subset of the method parameters that `@RequestMapping` does. Notably, it excludes any
712711
server-side specific parameter types. For details, see the list for
713-
xref:integration/rest-clients.adoc#rest-http-interface-method-parameters[@HttpExchange] and
712+
xref:integration/rest-clients.adoc#rest-http-service-client-method-parameters[@HttpExchange] and
714713
xref:web/webflux/controller/ann-methods/arguments.adoc[@RequestMapping].

framework-docs/modules/ROOT/pages/web/webmvc-client.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ libraries.
3030
See xref:integration/rest-clients.adoc#rest-resttemplate[`RestTemplate`] for details.
3131

3232

33-
[[webmvc-http-interface]]
34-
== HTTP Interface
33+
[[webmvc-http-service-client]]
34+
== HTTP Service Client
3535

3636
The Spring Framework lets you define an HTTP service as a Java interface with HTTP
3737
exchange methods. You can then generate a proxy that implements this interface and
3838
performs the exchanges. This helps to simplify HTTP remote access and provides additional
3939
flexibility for choosing an API style such as synchronous or reactive.
4040

41-
See xref:integration/rest-clients.adoc#rest-http-interface[HTTP Interface] for details.
41+
See xref:integration/rest-clients.adoc#rest-http-service-client[HTTP Service Client] for details.

framework-docs/modules/ROOT/pages/web/webmvc-versioning.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ to annotated controller methods with an API version
1616
to functional endpoints with an API version
1717

1818
Client support for API versioning is available also in `RestClient`, `WebClient`, and
19-
xref:integration/rest-clients.adoc#rest-http-interface[HTTP Service] clients, as well as
19+
xref:integration/rest-clients.adoc#rest-http-service-client[HTTP Service] clients, as well as
2020
for testing in MockMvc and `WebTestClient`.
2121

2222

framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-requestmapping.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,9 @@ Kotlin::
659659
[.small]#xref:web/webflux/controller/ann-requestmapping.adoc#webflux-ann-httpexchange-annotation[See equivalent in the Reactive stack]#
660660

661661
While the main purpose of `@HttpExchange` is to abstract HTTP client code with a
662-
generated proxy, the
663-
xref:integration/rest-clients.adoc#rest-http-interface[HTTP Interface] on which
664-
such annotations are placed is a contract neutral to client vs server use.
665-
In addition to simplifying client code, there are also cases where an HTTP Interface
662+
generated proxy, the interface on which such annotations are placed is a contract neutral
663+
to client vs server use. In addition to simplifying client code, there are also cases
664+
where an xref:integration/rest-clients.adoc#rest-http-service-client[HTTP Service Client]
666665
may be a convenient way for servers to expose their API for client access. This leads
667666
to increased coupling between client and server and is often not a good choice,
668667
especially for public API's, but may be exactly the goal for an internal API.
@@ -739,7 +738,7 @@ path, and content types.
739738
For method parameters and returns values, generally, `@HttpExchange` supports a
740739
subset of the method parameters that `@RequestMapping` does. Notably, it excludes any
741740
server-side specific parameter types. For details, see the list for
742-
xref:integration/rest-clients.adoc#rest-http-interface-method-parameters[@HttpExchange] and
741+
xref:integration/rest-clients.adoc#rest-http-service-client-method-parameters[@HttpExchange] and
743742
xref:web/webmvc/mvc-controller/ann-methods/arguments.adoc[@RequestMapping].
744743

745744
`@HttpExchange` also supports a `headers()` parameter which accepts `"name=value"`-like
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.docs.integration.resthttpinterface.customresolver;
17+
package org.springframework.docs.integration.resthttpserviceclient.customresolver;
1818

1919
import java.util.List;
2020

@@ -28,14 +28,14 @@
2828

2929
public class CustomHttpServiceArgumentResolver {
3030

31-
// tag::httpinterface[]
31+
// tag::httpserviceclient[]
3232
public interface RepositoryService {
3333

3434
@GetExchange("/repos/search")
3535
List<Repository> searchRepository(Search search);
3636

3737
}
38-
// end::httpinterface[]
38+
// end::httpserviceclient[]
3939

4040
class Sample {
4141

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.docs.integration.resthttpinterface.customresolver
17+
package org.springframework.docs.integration.resthttpserviceclient.customresolver
1818

1919
import org.springframework.core.MethodParameter
2020
import org.springframework.web.client.RestClient
@@ -26,14 +26,14 @@ import org.springframework.web.service.invoker.HttpServiceProxyFactory
2626

2727
class CustomHttpServiceArgumentResolver {
2828

29-
// tag::httpinterface[]
29+
// tag::httpserviceclient[]
3030
interface RepositoryService {
3131

3232
@GetExchange("/repos/search")
3333
fun searchRepository(search: Search): List<Repository>
3434

3535
}
36-
// end::httpinterface[]
36+
// end::httpserviceclient[]
3737

3838
class Sample {
3939
fun sample() {

0 commit comments

Comments
 (0)