Files
document-haness/docs/clean-architecture-backend-template/tech-log-studio/composition-and-lifecycle-models/concept/concept-adapter-outbound-cache-redis-c01.md
T
DongHyeonkaandClaude Opus 5 b2963105a8 docs(keycloak-session-store): import the session-storage lab as a new project
The keycloak project ended with four open questions that design could not
settle. A two-VM lab was built to answer them by measurement, and this is
that material: 26 experiments, 125 raw command outputs, 22 browser captures.

Follows the import procedure in README.md.

  source/     the originating repository verbatim — 78 documents, 28 SVGs,
              8 manifests, plus .source-revision recording the commit
  final/      the SSOT
    document.md   729 lines written from the 29 experiment documents, not
                  concatenated: what was predicted, what was measured, and
                  where the measurement itself was wrong
    evidence/raw    125 outputs, flattened to <experiment>__<file> because
                    the originals collided (01-baseline.txt appeared three
                    times) and the audit only globs the top level
    evidence/meta   one per raw file; command and exitCode are null and the
                    README says why rather than inventing them
    evidence/browser  22 captures
    assets/       three diagrams through techviz
    .techviz/     their VizSpecs

A separate project rather than an addition to keycloak: the B-layer answers
that project's four questions, but the A, C and D layers are about cluster
failure, SSO and operations, and one document.md should hold one subject.
The four question records there can point here through 관계.

Recorded rather than papered over: only three of the 28 diagrams were
remade. The repository forbids hand-drawn SVG and forbids titles inside the
canvas; all 28 originals carry both, so converting them is redrawing, not
reformatting. They stay in source/ and the gap is written into the document.

verify-pipeline.py passes. audit-records.py reports no issues.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 22:51:59 +09:00

3.4 KiB

kind, slug, title, topic, project, status, sourceRevision, rootTreeNode, evidenceCapturedOn, assets, evidence, source, module
kind slug title topic project status sourceRevision rootTreeNode evidenceCapturedOn assets evidence source module
CONCEPT adapter-outbound-cache-redis-c01 꺼져 있을 때 아무것도 기여하지 않는다는 말이 문자 그대로다 composition-and-lifecycle-models clean-architecture-backend-template 게시 전 21234e38cdb9a926cbc92bb97a2aee2e4a7d2916 concept:adapter-outbound-cache-redis-c01 2026-09-01
key file
adapter-outbound-cache-redis-c01 ../../../final/evidence/rendered/adapter-outbound-cache-redis-c01.svg
key file
adapter-outbound-cache-redis-c01-diagram ../../../final/assets/diagrams/adapter-outbound-cache-redis-c01.svg
../../../final/evidence/raw/adapter-outbound-cache-redis-c01.txt
원본 분석 절은 analysis/10-adapter-outbound-cache-redis.md#L85 이다.
adapter-outbound-cache-redis

꺼져 있을 때 아무것도 기여하지 않는다는 말이 문자 그대로다

RedisSdkSettings가 애플리케이션 전역 @ConfigurationPropertiesScan이 아니라 RedisSdkAutoConfiguration@Bean으로만 존재한다. 그래서 스위치가 꺼져 있으면 속성이 묶이지도 않는다.

본문

RedisSdkAutoConfiguration의 javadoc이 규칙을 적는다.

"app.redis.enabled is the whole switch. While it is false this class contributes nothing, and because RedisSdkSettings is registered here rather than by the application-wide @ConfigurationPropertiesScan, 'contributes nothing' is literal: the properties are not bound, the cross-field rules are not run, no credential is resolved, and no policy resource, TLS material, client, connection or thread is created."

조립이 고정된 순서

:::evidence key="adapter-outbound-cache-redis-c01-diagram" alt="설정 바인딩과 교차 필드 검증과 클라이언트 생성이 왼쪽에서 오른쪽으로 이어지고 화살표에 bound settings 와 검증 통과가 붙은 구조" caption="조립이 고정된 순서" zoom="false" :::

RedisSdkSettings@ConfigurationPropertiesScan 대상이 아니라 이 클래스의 @Bean + @ConfigurationProperties로만 존재한다. 그래서 Redis를 쓰지 않는 배포는 Redis 설정을 들고 다니지 않고, 켠 적 없는 잘못된 Redis 설정 때문에 벌을 받지도 않는다. test가 그 넷을 이름으로 고정한다 — absentSwitchRegistersNothing, disabledRegistersNothing, disabledIgnoresMalformedRedisConfiguration, disabledNeverAsksForASecretOrAConnection.

RedisSdkAutoConfiguration 참조 위치

:::evidence key="adapter-outbound-cache-redis-c01" alt="코드베이스에서 RedisSdkAutoConfiguration 를 검색한 출력 30줄. 이 기록이 세는 참조가 그 출력에 그대로 보인다." caption="RedisSdkAutoConfiguration 코드베이스 검색 — 30줄 · exit 0" zoom="true" :::

검증이 bean factory 메서드 안에 있는 이유

순서도 bind → validate → build로 고정된다. 검증이 @PostConstruct나 리스너가 아니라 bean factory 메서드 안에 있어서, 설정 오류가 "그 bean을 만들지 못했다"는 실패로 보고되고 그 아래 어떤 것도 검증되지 않은 settings를 잡을 수 없다. 그리고 redisSdkSettingsValidation이 별도 bean인 이유도 적혀 있다 — Spring은 factory 메서드가 반환한 뒤에 binder를 돌리므로 검증이 redisSdkSettings() 안에 있을 수 없다.