[최현호] Sprint7#231
Open
CHH01 wants to merge 3 commits into
Open
Conversation
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.
기본 요구사항
프로파일 기반 설정 관리
application-dev.yaml,application-prod.yaml파일 생성로그 관리
@Slf4j어노테이션 활용 로깅 구성application.yaml기본 로깅 레벨 설정 (기본:info)debug), 운영(info)logback-spring.xml) 구성{년}-{월}-{일} {시}:{분}:{초}:{밀리초} [{스레드명}] {로그 레벨(5자)} {로거 이름(36자)} - {로그 메시지}{프로젝트 루트}/.logs예외 처리 고도화
com.sprint.mission.discodeit.exception)ErrorCodeEnum 클래스 정의 (예외 코드명 및 메시지)DiscodeitException클래스 정의 (details속성 포함)UserException,ChannelException등)UserNotFoundException등)ErrorResponse클래스를 통한 일관된 응답 구조 정의 (status, exceptionType 포함)@RestControllerAdvice기반 전역 예외 핸들러 구현유효성 검사
@NotNull,@NotBlank,@Size,@Email등)@Valid적용 및 데이터 검증MethodArgumentNotValidException전역 예외 처리 및 상세 오류 메시지 반환Actuator
health,info,metrics,loggersinfo상세 정보 구성테스트 코드
1. 단위 테스트 (Service Layer)
UserService,ChannelService,MessageService핵심 메소드 테스트Mockito및BDDMockito를 활용한 의존성 모의(Mock) 처리2. 슬라이스 테스트 (Repository & Controller)
@DataJpaTest활용 및application-test.yaml구성@EnableJpaAuditing추가@WebMvcTest및MockMvc활용@Import를 통한 추가 빈 등록3. 통합 테스트 (Integration Test)
@SpringBootTest기반 애플리케이션 컨텍스트 로드@Transactional을 활용한 테스트 독립성 보장심화 요구사항
MDC를 활용한 로깅 고도화
헤더 이름: Discodeit-Request-ID
Spring Boot Admin을 활용한 메트릭 가시화
테스트 커버리지 관리
멘토에게