Skip to content

Comments

test/#redis#115

Open
kswdot wants to merge 2 commits intomainfrom
test/#redis
Open

test/#redis#115
kswdot wants to merge 2 commits intomainfrom
test/#redis

Conversation

@kswdot
Copy link
Collaborator

@kswdot kswdot commented Dec 6, 2025

🗞️ 연관된 이슈

🔥 이슈번호

✅ 작업 내용

  • redis 초기 설정

📸 스크린샷 (선택)

체크리스트 ✅

  • 코드가 정상적으로 컴파일되나요?
  • merge할 브랜치의 위치를 확인했나요?
  • 테스트 코드를 작성하셨나요?

기타

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @kswdot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 애플리케이션에 Redis를 통합하는 초기 설정을 완료합니다. 이를 통해 캐싱, 세션 관리 등 다양한 용도로 Redis를 활용할 수 있는 기반을 마련하며, 애플리케이션의 성능과 확장성을 향상시키는 데 기여할 것입니다. 필요한 의존성 추가, 설정 클래스 정의, 그리고 기본적인 연결 테스트까지 포함되어 있습니다.

Highlights

  • Redis 의존성 추가: 프로젝트의 build.gradle 파일에 spring-boot-starter-data-redis 의존성을 추가하여 Redis 통합을 위한 기반을 마련했습니다.
  • Redis 설정 클래스 추가: Redis 연결 및 데이터 직렬화를 위한 RedisConfig.java 클래스를 새로 추가했습니다. 이 클래스는 RedisTemplate 빈을 정의하고 키와 값의 직렬화 방식을 설정합니다.
  • Redis 연결 속성 구성: application.yml 파일에 Redis 서버의 호스트, 포트, 타임아웃 등 연결 관련 속성을 추가하여 Redis 서버에 접속할 수 있도록 설정했습니다.
  • Redis 연결 테스트 코드 추가: Redis 연결이 올바르게 작동하는지 확인하기 위해 RedisTest.java라는 간단한 테스트 클래스를 추가했습니다. 이 테스트는 Redis에 값을 저장하고 다시 조회하는 방식으로 연결을 검증합니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kswdot kswdot self-assigned this Dec 6, 2025
@kswdot kswdot linked an issue Dec 6, 2025 that may be closed by this pull request
1 task
@kswdot kswdot requested a review from JayongLee December 6, 2025 02:28
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 Redis 초기 설정을 추가하는 것을 목표로 하고 있습니다. 전반적으로 Redis 의존성 추가, RedisTemplate 설정, application.yml 설정 및 테스트 코드 추가가 잘 이루어졌습니다. 하지만 몇 가지 개선할 점이 보입니다. RedisConfig에서 불필요한 afterPropertiesSet() 호출이 있고, application.ymltimeout 설정이 비어 있어 애플리케이션 시작 오류를 유발할 수 있습니다. 또한, 추가된 테스트 코드가 실제 설정한 RedisTemplate을 사용하지 않고 있으며, 검증을 위한 assertion이 빠져있습니다. 아래의 리뷰 코멘트에서 자세한 내용을 확인하고 수정해 주시기 바랍니다.

@kswdot
Copy link
Collaborator Author

kswdot commented Dec 6, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 PR은 Redis 초기 설정을 추가하는 것을 목표로 하고 있습니다. build.gradle에 Redis 의존성을 추가하고, RedisConfig를 통해 RedisTemplate 빈을 설정하며, application.yml에 Redis 연결 정보를 추가했습니다. 전반적으로 올바른 방향이지만, 몇 가지 개선할 점이 보입니다. GenericJackson2JsonRedisSerializer 사용 시 발생할 수 있는 보안 취약점, 설정 파일의 하드코딩된 값, 그리고 비활성화되어 있고 단언문이 없는 테스트 코드 등입니다. 아래에 자세한 리뷰를 남겼으니 확인 부탁드립니다.

import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;

@Disabled
Copy link
Contributor

Choose a reason for hiding this comment

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

high

@Disabled 어노테이션으로 인해 테스트 클래스가 비활성화되어 있습니다. 비활성화된 테스트는 실행되지 않으므로 코드 품질을 보장하거나 회귀를 방지하는 데 아무런 도움이 되지 않습니다. 만약 실행 중인 Redis 인스턴스가 필요해서 비활성화했다면, 그 이유를 주석으로 명시하고 CI/CD 파이프라인에서 특정 조건에서만 실행되도록 (예: @Tag나 Spring Profile 사용) 구성하는 것이 좋습니다. 지금 당장 실행할 수 없는 테스트라면 PR에 포함하지 않는 것도 방법입니다. 우선은 이 테스트가 실행되도록 @Disabled를 제거하는 것을 권장합니다.

Comment on lines +11 to +12
host: localhost
port: 6379
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Redis 호스트와 포트가 localhost6379로 하드코딩되어 있습니다. 이렇게 하면 개발, 스테이징, 프로덕션 등 다양한 환경에 배포할 때 설정을 변경하기 어렵습니다. 데이터베이스 설정처럼 환경 변수를 사용하고 로컬 개발을 위한 기본값을 제공하는 방식을 사용하는 것이 좋습니다.

      host: ${REDIS_HOST:localhost}
      port: ${REDIS_PORT:6379}

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.

test/#redis

2 participants