Files
spring-boot-demo/http-service-clients/output/01-registry-and-crud.txt
T
2026-11-06 21:44:06 +05:30

39 lines
1.1 KiB
Plaintext

# groups the HttpServiceProxyRegistry knows about
group apikey -> [ApiKeyClient]
group bearer -> [SecureClient]
group flaky -> [FlakyClient]
group github -> [GitHubClient]
group oauth -> [OAuthClient]
group posts -> [ParamsClient, PostClient]
group resilient -> [ResilientClient]
PostClient bean is a JDK proxy: true
registry.getClient("posts", PostClient.class) is the injected bean: true
# CRUD against the stub (every call is a real HTTP request)
findAll() -> 3 posts
findById(1) -> Post[id=1, userId=1, title=First post, body=Body of the first post]
findByUser(2) -> [3]
findEntity(2) -> status 200 OK, Content-Type application/json
create(...) -> id 101
update(1, ...) -> title 'Updated Title'
delete(1) -> void, no exception
# argument kinds (ParamsClient)
@RequestHeader -> upstream saw X-Correlation-Id=abc-123
@RequestParam(required=false), null -> 3 posts
@RequestParam(defaultValue="2") -> posts [3]
URI argument -> Second post
# what the stub actually received
GET /posts
GET /posts/1
GET /posts?userId=2
GET /posts/2
POST /posts
PUT /posts/1
DELETE /posts/1
GET /echo/headers
GET /posts
GET /posts?userId=2
GET /posts/2