Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0be5c3d
feat(bucket4j) : 의존성 추가
jsoonworld Jun 14, 2025
bc72e2c
feat(JwtAuthenticationFilter): Rate Limit 기능 추가를 위한 Bucket4j 의존성 설정
jsoonworld Jun 15, 2025
b61c39e
refactor(GlobalExceptionHandler): RateLimitException 핸들러 제거
jsoonworld Jun 15, 2025
322ccb3
feat(CustomJwtAuthenticationEntryPoint): 인증 실패 시 401 JSON 에러 응답을 직접 생…
jsoonworld Jun 15, 2025
79058ab
feat(JwtAuthenticationFilter): 잘못된 JWT 토큰 요청에 대한 Rate Limit 적용
jsoonworld Jun 15, 2025
6b7feab
refactor(JwtTokenVerifier): 예외 발생 시 호출자에게 책임을 위임하도록 변경
jsoonworld Jun 15, 2025
e6ec620
feat(RateLimitingService): Bucket4j를 이용한 IP 기반 Rate Limiting 서비스 구현
jsoonworld Jun 15, 2025
d94aaef
feat(IpAddressUtil): 클라이언트 IP 주소 추출 유틸리티 구현
jsoonworld Jun 15, 2025
0b01fcf
refactor(Company): 전체 필드를 포함하는 생성자 추가
jsoonworld Jun 15, 2025
dd54ab1
refactor(InternshipAnnouncement): 전체 필드를 초기화하는 생성자 추가
jsoonworld Jun 15, 2025
c4cc53a
test(JwtAuthenticationFilter): Rate Limit 기능에 대한 통합 테스트 추가
jsoonworld Jun 15, 2025
e1dc0b0
style(ScrapServiceTest): 코드 스타일 수정
jsoonworld Jun 15, 2025
d21b1da
refactor(JwtAuthenticationFilter): 불필요한 예외 처리 로직 제거 및 코드 간소화
jsoonworld Jun 15, 2025
e05ae06
refactor(JwtAuthenticationFilter): 잘못된 토큰 요청 시 401 응답을 즉시 반환하도록 수정
jsoonworld Jun 15, 2025
019d77c
refactor(JwtFilter) : 코드 리뷰 반영
jsoonworld Jun 16, 2025
03aadcc
merge(jwt) : 잘못된 JWT 토큰 요청에 대한 Rate Limit 적용
jsoonworld Jun 16, 2025
c236c9a
Merge branch 'develop' of https://github.com/teamterning/Terning-Serv…
JungYoonShin Jul 28, 2025
5e1985b
[FEAT] 애플리케이션 성능 측정을 위한 프로메테우스 의존성 추가
JungYoonShin Jul 29, 2025
25c6c23
[MERGE] develop과 align 맞추기
JungYoonShin Jul 29, 2025
fed112a
[REFACTOR] 필요없는 import 삭제
JungYoonShin Jul 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ dependencies {
// Spring Batch
implementation 'org.springframework.boot:spring-boot-starter-batch'

// Monitoring
implementation 'io.micrometer:micrometer-registry-prometheus'

}

//QueryDSL 초기 설정
Expand Down Expand Up @@ -100,4 +103,4 @@ configurations {

tasks.named('test') {
useJUnitPlatform()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,23 @@ public ResponseEntity<ErrorResponse> handleAuthException(JwtException e) {
}

@ExceptionHandler(Exception.class)
public ResponseEntity handleException(Exception e){
public ResponseEntity<ErrorResponse> handleException(Exception e){
log.warn("[Exception] cause: {} , message: {}", NestedExceptionUtils.getMostSpecificCause(e), e.getMessage());
ErrorMessage errorCode = ErrorMessage.INTERNAL_SERVER_ERROR;
return ResponseEntity
.status(errorCode.getStatus())
.body(ErrorResponse.of(errorCode.getStatus(), errorCode.getMessage()));
}

//메소드가 잘못되었거나 부적합한 인수를 전달했을 경우 -> 필수 파라미터 없을 때
@ExceptionHandler(IllegalArgumentException.class)
public ResponseEntity handleIllegalArgumentException(IllegalArgumentException e){
public ResponseEntity<ErrorResponse> handleIllegalArgumentException(IllegalArgumentException e){
log.warn("[IlleagalArgumentException] cause: {} , message: {}", NestedExceptionUtils.getMostSpecificCause(e), e.getMessage());
ErrorMessage errorCode = ErrorMessage.ILLEGAL_ARGUMENT_ERROR;
return ResponseEntity
.status(errorCode.getStatus())
.body(ErrorResponse.of(errorCode.getStatus(), errorCode.getMessage()));
}

//@Valid 유효성 검사에서 예외가 발생했을 때 -> requestbody에 잘못 들어왔을 때
@ExceptionHandler(MethodArgumentNotValidException.class)
public ResponseEntity<ErrorResponse> handleMethodArgumentNotValidException(MethodArgumentNotValidException e){
log.warn("[MethodArgumentNotValidException] cause: {}, message: {}", NestedExceptionUtils.getMostSpecificCause(e), e.getMessage());
Expand All @@ -75,7 +73,6 @@ public ResponseEntity<ErrorResponse> handleMethodArgumentNotValidException(Metho
.body(ErrorResponse.of(errorCode.getStatus(), errorCode.getMessage()));
}

//잘못된 포맷 요청 -> Json으로 안보내다던지
@ExceptionHandler(HttpMessageNotReadableException.class)
public ResponseEntity<ErrorResponse> handleHttpMessageNotReadableException(HttpMessageNotReadableException e){
log.warn("[HttpMessageNotReadableException] cause: {}, message: {}", NestedExceptionUtils.getMostSpecificCause(e), e.getMessage());
Expand All @@ -84,6 +81,7 @@ public ResponseEntity<ErrorResponse> handleHttpMessageNotReadableException(HttpM
.status(errorCode.getStatus())
.body(ErrorResponse.of(errorCode.getStatus(), errorCode.getMessage()));
}

@ExceptionHandler(HttpRequestMethodNotSupportedException.class)
public ResponseEntity<ErrorResponse> handleHttpMethodException(
HttpRequestMethodNotSupportedException e,
Expand All @@ -95,5 +93,4 @@ public ResponseEntity<ErrorResponse> handleHttpMethodException(
.status(errorCode.getStatus())
.body(ErrorResponse.of(errorCode.getStatus(), errorCode.getMessage()));
}
}

}
Loading