Skip to content

Merge develop into main#334

Merged
soun997 merged 12 commits intomainfrom
develop
Sep 17, 2025
Merged

Merge develop into main#334
soun997 merged 12 commits intomainfrom
develop

Conversation

@soun997
Copy link
Copy Markdown
Contributor

@soun997 soun997 commented Sep 17, 2025

No description provided.

@soun997 soun997 self-assigned this Sep 17, 2025
@soun997 soun997 requested a review from Copilot September 17, 2025 09:57
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR merges the develop branch into main, adding rate limiting functionality to the application along with supporting infrastructure and configuration changes.

  • Added API throttling filter with configurable rate limiting using Redis-backed bucket4j
  • Added new authentication endpoint for token validation
  • Added Neo4j database initialization for local development environment

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/java/com/sillim/recordit/config/filter/ApiThrottlingFilter.java Core rate limiting filter implementation using bucket4j
src/main/java/com/sillim/recordit/config/ratelimiter/RateLimiterConfig.java Configuration for rate limiter with Redis backend
src/main/java/com/sillim/recordit/config/filter/LimitApi.java Utility class for defining rate-limited API patterns
src/main/java/com/sillim/recordit/config/cache/RedisConfig.java Added RedisClient bean for rate limiter
src/main/java/com/sillim/recordit/member/controller/LoginController.java Added token validation endpoint
src/main/java/com/sillim/recordit/global/exception/ErrorCode.java Added error code for rate limiting
src/main/java/com/sillim/recordit/config/neo4j/LocalNeo4jInitializer.java Database initialization for local environment
src/test/java/com/sillim/recordit/config/filter/ApiThrottlingFilterTest.java Unit tests for rate limiting filter
src/test/java/com/sillim/recordit/support/restdocs/RestDocsTest.java Added mock bean for filter testing
application-*.yml Configuration properties for rate limiting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

long waitForRefill = probe.getNanosToWaitForRefill() / 1_000_000_000;

HttpServletResponse httpResponse = (HttpServletResponse) response;
httpResponse.setContentType("text/plain; charset=UTF-8");
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content type is set to 'text/plain' but the response body contains JSON. This should be 'application/json; charset=UTF-8' to match the actual response format.

Suggested change
httpResponse.setContentType("text/plain; charset=UTF-8");
httpResponse.setContentType("application/json; charset=UTF-8");

Copilot uses AI. Check for mistakes.
Comment on lines +87 to +91
ResponseEntity.status(TOO_MANY_REQUEST)
.body(
ErrorResponse.from(
ErrorCode.TOO_MANY_REQUEST,
waitForRefill + "초 뒤에 다시 시도해주세요"))));
Copy link

Copilot AI Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writing a ResponseEntity as JSON string will include HTTP headers and metadata in the response body. Extract only the body using .getBody() or create the ErrorResponse directly without wrapping it in ResponseEntity.

Suggested change
ResponseEntity.status(TOO_MANY_REQUEST)
.body(
ErrorResponse.from(
ErrorCode.TOO_MANY_REQUEST,
waitForRefill + "초 뒤에 다시 시도해주세요"))));
ErrorResponse.from(
ErrorCode.TOO_MANY_REQUEST,
waitForRefill + "초 뒤에 다시 시도해주세요")));

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@soun997 soun997 merged commit e205a87 into main Sep 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants