-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor: Update JWT token handling and adjust S3 configuration #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
κ°μCI μν¬νλ‘μ°μ Java λ°νμμ λ²μ 17μμ 21λ‘ μ κ·Έλ μ΄λνκ³ , JWT ν ν° νμμ λΉλ λ¨κ³λ₯Ό μΆκ°νμΌλ©°, AWS 리μ μ€μ ν€λ₯Ό λ³κ²½νκ³ , λ‘컬 λ°μ΄ν°λ² μ΄μ€ μ€μ μ μμ±κ°μ μΈμ© λΆνΈλ‘ κ°μΈλ λ³κ²½μ¬νλ€μ λλ€. λ³κ²½μ¬ν
μμ μ½λ 리뷰 λμ΄λπ― 2 (λ¨μ) | β±οΈ ~12λΆ κ΄λ ¨ κ°λ₯μ± μλ PR
μ
π₯ Pre-merge checks | β 2 | β 1β Failed checks (1 warning)
β Passed checks (2 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. β¨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
π€ Fix all issues with AI agents
In @src/main/java/inha/gdgoc/global/config/s3/S3Config.java:
- Around line 14-17: μ ν리μΌμ΄μ
λ‘컬 μ€μ κ³Ό μ½λμ νλ‘νΌν° ν€κ° λΆμΌμΉν΄
awsRegion(@Value("${spring.cloud.aws.region.static}") String region) λΉ μμ±μ΄
μ€ν¨ν©λλ€; src/main/resources/application-local.ymlμμ cloud.aws.region.staticλ₯Ό
spring.cloud.aws.region.staticλ‘ λ³κ²½νκ±°λ λͺ¨λ AWS μ€μ μ spring.cloud.aws λ€μμ€νμ΄μ€λ‘ ν΅μΌνμ¬
@Valueμ μ¬μ©λ ν€μ μΌμΉμν€κ³ λ‘컬 νλ‘νμΌλ‘ μ€ν μ λΉμ΄ μ μ μμ±λλλ‘ μμ νμΈμ.
π Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (4)
.github/workflows/ci.ymlsrc/main/java/inha/gdgoc/global/config/jwt/TokenProvider.javasrc/main/java/inha/gdgoc/global/config/s3/S3Config.javasrc/main/resources/application-local.yml
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
π Additional comments (4)
src/main/java/inha/gdgoc/global/config/s3/S3Config.java (1)
19-27: μ½λ ν¬λ§·ν κ°μ μ΄ μ μ©λμμ΅λλ€.λΉ λ©μλλ€μ λ€μ¬μ°κΈ°κ° μΌκ΄λκ² μ 리λμμ΅λλ€. μ½λ κ°λ μ±μ΄ ν₯μλμκ³ κΈ°λ₯μ λ³κ²½μ μμ΅λλ€.
src/main/resources/application-local.yml (1)
13-14: YAML μμ± κ° μΈμ© μ²λ¦¬κ° μ μ©λμμ΅λλ€.λ°μ΄ν°μμ€ URLκ³Ό μ¬μ©μλͺ μ λ°μ΄νλ₯Ό μΆκ°ν κ²μ μ’μ λ°©μ΄μ νλ‘κ·Έλλ° μ¬λ‘μ λλ€. μ΄λ νΉμ λ¬Έμκ° ν¬ν¨λ κ²½μ° YAML νμ± μ€λ₯λ₯Ό λ°©μ§νκ³ , κ°μ΄ λͺ μμ μΌλ‘ λ¬Έμμ΄λ‘ μ²λ¦¬λλλ‘ λ³΄μ₯ν©λλ€.
.github/workflows/ci.yml (1)
26-29: Java 21 μ κ·Έλ μ΄λλ μ΄λ―Έ νλ‘μ νΈμ μ μ©λμ΄ μμΌλ©° νΈνμ± λ¬Έμ κ° μμ΅λλ€.νμ¬ build.gradleμμ μ΄λ―Έ
JavaLanguageVersion.of(21)λ‘ μ€μ λμ΄ μκ³ , λͺ¨λ μ£Όμ μμ‘΄μ±μ΄ Java 21μ μ§μν©λλ€:
- Gradle 8.11.1 (νμ: 8.5+) β
- Spring Boot 3.5.9 β
- jjwt 0.13.0, AWS SDK 3.4.2, PostgreSQL 42.7.3 λ± λͺ¨λ νΈν β
ci.ymlμ λ³κ²½μ κΈ°μ‘΄ λΉλ μ€μ κ³Ό μΌμΉνλ―λ‘ μμ νκ² μ§ν κ°λ₯ν©λλ€.
src/main/java/inha/gdgoc/global/config/jwt/TokenProvider.java (1)
106-112: jjwt 0.13.0μμ.build()νΈμΆμ΄ μ¬λ°λ₯΄κ² μ μ©λμμ΅λλ€.
getClaimsλ©μλμ.build()νΈμΆμ jjwt 0.13.0μμ νμμ μ΄λ©° νμ¬ κ΅¬νμ΄ μ¬λ°λ¦ λλ€. jjwt 0.11.x μ΄μμμλ νμ λΉλ ν¨ν΄μΌλ‘ λ³κ²½λμ΄Jwts.parser()μ²΄μΈ μ¬μ΄μ.build()λ₯Ό λͺ μμ μΌλ‘ νΈμΆνκ³ , κ·Έ μ΄νμparseClaimsJws()λ©μλλ₯Ό νΈμΆν΄μΌ ν©λλ€. νμ¬ μ½λκ° μ΄ ν¨ν΄μ μ νν λ°λ₯΄κ³ μμΌλ―λ‘ μΆκ° μμ μ λΆνμν©λλ€.
| @Bean | ||
| public Region awsRegion(@Value("${spring.cloud.aws.region.static}") String region) { | ||
| return Region.of(region); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ€μ λΆμΌμΉ: application-local.ymlμ μμ± ν€λ₯Ό μ λ°μ΄νΈν΄μΌ ν©λλ€.
@Value μ£Όμμμ μμ± ν€κ° spring.cloud.aws.region.staticμΌλ‘ λ³κ²½λμμ§λ§, src/main/resources/application-local.yml νμΌμ 54λ²μ§Έ μ€μλ μ¬μ ν cloud.aws.region.static (spring μ λμ¬ μμ΄)μΌλ‘ λμ΄ μμ΅λλ€.
μ΄λ Spring Cloud AWS 3.xλ‘μ λ§μ΄κ·Έλ μ΄μ
μΌλ‘ 보μ΄λλ°, λͺ¨λ μμ± ν€μ spring. μ λμ¬κ° νμν©λλ€. μ΄ λΆμΌμΉλ‘ μΈν΄ local νλ‘νμΌλ‘ μ€ν μ λΉ μμ±μ΄ μ€ν¨ν©λλ€.
π§ application-local.yml μμ μ μ
src/main/resources/application-local.yml νμΌμμ λ€μκ³Ό κ°μ΄ μμ μ΄ νμν©λλ€:
cloud:
aws:
credentials:
access-key: ${AWS_ACCESS_KEY_ID}
secret-key: ${AWS_SECRET_ACCESS_KEY}
region:
- static: ${AWS_REGION}
+ static: ${AWS_REGION}
+
+# Spring Cloud AWS 3.x μμ±
+spring:
+ cloud:
+ aws:
+ region:
+ static: ${AWS_REGION}λλ λͺ¨λ AWS μ€μ μ spring.cloud.aws λ€μμ€νμ΄μ€λ‘ μ΄λνλ κ²μ κΆμ₯ν©λλ€.
Committable suggestion skipped: line range outside the PR's diff.
π€ Prompt for AI Agents
In @src/main/java/inha/gdgoc/global/config/s3/S3Config.java around lines 14 -
17, μ ν리μΌμ΄μ
λ‘컬 μ€μ κ³Ό μ½λμ νλ‘νΌν° ν€κ° λΆμΌμΉν΄
awsRegion(@Value("${spring.cloud.aws.region.static}") String region) λΉ μμ±μ΄
μ€ν¨ν©λλ€; src/main/resources/application-local.ymlμμ cloud.aws.region.staticλ₯Ό
spring.cloud.aws.region.staticλ‘ λ³κ²½νκ±°λ λͺ¨λ AWS μ€μ μ spring.cloud.aws λ€μμ€νμ΄μ€λ‘ ν΅μΌνμ¬
@Valueμ μ¬μ©λ ν€μ μΌμΉμν€κ³ λ‘컬 νλ‘νμΌλ‘ μ€ν μ λΉμ΄ μ μ μμ±λλλ‘ μμ νμΈμ.
π μ°κ΄λ μ΄μ
β¨ μμ λ΄μ©
π¬ 리뷰 μꡬμ¬ν(μ ν)
Summary by CodeRabbit
λ¦΄λ¦¬μ€ λ ΈνΈ
Chores
Refactor
βοΈ Tip: You can customize this high-level summary in your review settings.