40 lines
2.2 KiB
Markdown
40 lines
2.2 KiB
Markdown
# HTTP Client Capability Composition Ownership
|
|
|
|
## Goal
|
|
|
|
Move optional HTTP-client Spring composition out of app-bootstrap and into the HTTP-client capability leaf without weakening startup validation, runtime activation, override seams, or test coverage.
|
|
|
|
## Target ownership
|
|
|
|
### adapter:outbound:support
|
|
|
|
Own reusable Spring-capability support that is not specific to one provider:
|
|
- strict, master-gated settings binding;
|
|
- a capability startup validation exception that is an IllegalStateException and a Spring Boot ExitCodeGenerator with exit 78.
|
|
|
|
The support exception does not know bootstrap internals. app-bootstrap may recognize the generic type in its existing exception reporter and emit the repository-standard structured STARTUP_VALIDATION_FAILED log.
|
|
|
|
### adapter:outbound:httpclient
|
|
|
|
Own the complete HTTP-client auto-configuration: settings and strict binding, environment-key validation, authentication, TLS/security, resilience, observation, blocking/reactive transport assembly, profile/runtime registry, service/gateway and dynamic-target assembly, actuator endpoint, and startup validation.
|
|
|
|
The leaf publishes its root auto-configuration through Boot AutoConfiguration.imports. Runtime activation remains app.httpclient.enabled=true. When absent or false the root auto-configuration creates no client, pool, transport, thread, scheduler, or endpoint.
|
|
|
|
### app-bootstrap
|
|
|
|
Keep only application-wide startup reporting. It must not import HTTP-client implementation or auto-configuration types after this slice.
|
|
|
|
## Compatibility constraints
|
|
|
|
- app.httpclient.* keys remain unchanged.
|
|
- unknown configuration/environment keys continue to fail closed.
|
|
- enabled-without-clients and unsafe production settings continue to fail startup with the same operator-facing messages.
|
|
- capability startup configuration errors retain exit code 78 and structured startup reporting.
|
|
- existing ConditionalOnMissingBean override seams remain.
|
|
- actuator endpoint remains absent while disabled.
|
|
- ordinary HTTP-client unit tests remain Docker-free.
|
|
|
|
## Build boundary
|
|
|
|
This slice moves ownership first. It does not yet flip the app-bootstrap project dependency to runtimeOnly; that belongs to the following build-composition phase after production imports are proven to be zero.
|