Skip to content

[Phase5] Issue #8: Filter 등록 및 설정 #8

Description

@724thomas

Phase 목표: Servlet Filter 구현

목표: Spring Boot에 Filter 등록 및 설정

작업 내용

  • FilterConfiguration 클래스 구현
  • FilterRegistrationBean 설정
  • URL 패턴 및 Filter 순서 설정
  • 통합 테스트 작성 (MockMvc 활용)

완료 기준

  • RateLimitFilter가 Spring Boot에 정상 등록
  • 적절한 URL 패턴에만 필터 적용
  • 올바른 필터 순서 설정
  • MockMvc를 통한 end-to-end 테스트

핵심 설정

  • Filter 우선순위 설정
  • URL 패턴 매칭 (/* 또는 특정 패턴)
  • 제외할 URL 패턴 (health check 등)
  • Filter 초기화 매개변수

통합 테스트 시나리오

  • 정상 요청 처리 확인
  • Rate Limit 초과 시 429 응답
  • 응답 헤더 검증
  • 다양한 사용자 ID 처리

파일 위치

  • src/main/java/com/example/demo/ratelimiter/filter/FilterConfiguration.java
  • src/test/java/com/example/demo/ratelimiter/integration/RateLimitFilterIntegrationTest.java

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions