From 2576702cdad1e28a99114525084a6ef8aec1697a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= <141109+sdeleuze@users.noreply.github.com> Date: Tue, 18 Feb 2025 11:57:04 +0100 Subject: [PATCH] Use public interface for HTTP Interface documentation Closes gh-34443 --- .../modules/ROOT/pages/integration/rest-clients.adoc | 4 ++-- .../customresolver/CustomHttpServiceArgumentResolver.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/integration/rest-clients.adoc b/framework-docs/modules/ROOT/pages/integration/rest-clients.adoc index 94a163f4ab..d6a143eab1 100644 --- a/framework-docs/modules/ROOT/pages/integration/rest-clients.adoc +++ b/framework-docs/modules/ROOT/pages/integration/rest-clients.adoc @@ -857,7 +857,7 @@ Start by creating the interface with `@HttpExchange` methods: [source,java,indent=0,subs="verbatim,quotes"] ---- - interface RepositoryService { + public interface RepositoryService { @GetExchange("/repos/{owner}/{repo}") Repository getRepository(@PathVariable String owner, @PathVariable String repo); @@ -908,7 +908,7 @@ For `RestTemplate`: [source,java,indent=0,subs="verbatim,quotes"] ---- @HttpExchange(url = "/repos/{owner}/{repo}", accept = "application/vnd.github.v3+json") - interface RepositoryService { + public interface RepositoryService { @GetExchange Repository getRepository(@PathVariable String owner, @PathVariable String repo); diff --git a/framework-docs/src/main/java/org/springframework/docs/integration/resthttpinterface/customresolver/CustomHttpServiceArgumentResolver.java b/framework-docs/src/main/java/org/springframework/docs/integration/resthttpinterface/customresolver/CustomHttpServiceArgumentResolver.java index 779654bbad..8fd2a12ee0 100644 --- a/framework-docs/src/main/java/org/springframework/docs/integration/resthttpinterface/customresolver/CustomHttpServiceArgumentResolver.java +++ b/framework-docs/src/main/java/org/springframework/docs/integration/resthttpinterface/customresolver/CustomHttpServiceArgumentResolver.java @@ -29,7 +29,7 @@ import org.springframework.web.service.invoker.HttpServiceProxyFactory; public class CustomHttpServiceArgumentResolver { // tag::httpinterface[] - interface RepositoryService { + public interface RepositoryService { @GetExchange("/repos/search") List searchRepository(Search search);