리팩토링: @Value → @ConfigurationProperties 전환 - #19
Merged
Conversation
산재되어 있던 @value 필드 주입을 타입 안전한 record properties로 통합. 테스트 시 reflection 없이 생성자로 직접 주입할 수 있어 단위 테스트 도입의 사전 작업 역할. 신규 properties (4개, demo-external/.../config/properties): - OpenAiProperties (apiKey, chatEndpoint, model) - YoloProperties (url, 기본값 http://localhost:5000) - LamaProperties (url, 기본값 http://localhost:7870) - AwsS3Properties (bucket) 전환 대상: - GptVisionClient, YoloDetectionClient, LamaInpaintClient, S3ImageStore (demo-external) - ExternalFileClientImpl (demo-external) — bucket 일관성 확보 - OpenAiConfig (demo-api) — RestTemplate interceptor의 apiKey - RoomGenieApplication에 @ConfigurationPropertiesScan 추가 application.properties 정리: - 키 마이그레이션: openai.api.key → openai.api-key openai.api.url2 → openai.chat-endpoint openai.model1 → openai.model - 죽은 키 3개 제거: openai.api.url, openai.model2, openai.api.url.image - main + test 양쪽 모두 동일하게 적용 검증: - ./gradlew compileJava 통과 - ./gradlew test 통과 (Spring context 정상 로드) 비고: - cloud.aws.s3.base-url은 demo-domain의 FileGenerator에서 사용 중이며, 의존 방향(demo-domain ↛ demo-external) 때문에 본 PR 스코프 밖. AwsS3Properties는 우선 bucket만 포함하고 base-url 정리는 후속 PR로 분리. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
산재되어 있던 @value 필드 주입을 타입 안전한 record properties로 통합. 테스트 시 reflection 없이 생성자로 직접 주입할 수 있어 단위 테스트 도입의 사전 작업 역할.
신규 properties (4개, demo-external/.../config/properties):
전환 대상:
application.properties 정리:
openai.api.key → openai.api-key
openai.api.url2 → openai.chat-endpoint
openai.model1 → openai.model
검증:
비고: