Skip to content

chore : 서버 배포용 server 프로필 추가와 공통 설정 분리 - #39

Open
yuyeol3 wants to merge 1 commit into
mainfrom
yuyeol3/chore/server-profile
Open

yuyeol3 wants to merge 1 commit into
mainfrom
yuyeol3/chore/server-profile

Conversation

@yuyeol3

@yuyeol3 yuyeol3 commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

변경점 👍

Fin-BE-test 포크에서 하던 dev 서버 배포를 이 레포로 옮기는 작업의 첫 단계입니다. 운영 서버가 dev 프로필 없이 뜰 수 있도록 설정을 나눴습니다. 배포 워크플로는 다음 PR에서 올립니다.

  • application.yml: application-dev.yml에 있던 공통 설정(OAuth2 클라이언트, JWT, JPA validate, sql.init, OAuth2 리다이렉트 경로)을 옮겼습니다.
  • application-dev.yml: 로컬 전용 값만 남겼습니다(localhost DB, 프론트 localhost:5173, 비보안 쿠키).
  • application-server.yml (신규): 서버 공통 설정입니다. Fin-BE-test의 application-test.yml에서 서버용 차이만 가져왔습니다.
    • server.forward-headers-strategy: framework (nginx 뒤에서 https 리다이렉트 URL 생성)
    • app.cookie.secure: true, same-site: None
    • app.frontend.url: ${FRONTEND_URL}
    • DB 접속 정보는 SPRING_DATASOURCE_* 환경 변수로 받습니다.
  • 서버 프로필 계획: dev 서버는 dev,server(Swagger 켜짐), 운영은 server.

로컬 실행 방법은 바뀌지 않습니다. .env도 그대로 쓰면 됩니다.

테스트 💻

  • ./gradlew test integrationTest 통과
  • bootJar를 로컬 DB에 붙여 직접 기동
    • 기본(dev): 기동, Swagger 200, OAuth redirect_uri가 http://localhost
    • server 단독(.env 없이 환경 변수만): 기동, Flyway validate 통과, /api/categories 200, Swagger 401(차단), X-Forwarded-Proto: https일 때 redirect_uri가 https 도메인

비고

머지해도 서버에는 영향이 없습니다. 전체 계획은 Fin-BE(배포)와 Fin-API(CI, 2주 간격 수집) PR로 이어집니다.

OAuth2·JWT·JPA 공통 설정을 application.yml로 옮겨 dev 프로필 없이도 뜨게 하고,
nginx 뒤 서버용 설정(forwarded header, secure 쿠키, 프론트 URL)을 application-server.yml로 분리
@github-actions

Copy link
Copy Markdown

Backend Code Health Report

Commit: 6516607

Metric Current Base Change
Line Coverage 88.8% 88.8% 0.0 pp ✅
Branch Coverage 73.2% 73.2% 0.0 pp ✅
Code Health 92.8 (A) 92.8 (A) 0.0 ✅
Duplicated Lines 0.4% 0.4% 0.0 pp ✅
High-complexity Methods 10 10 0 ✅
PMD Issues 13 13 0 ✅

Attention

  • src/main/java/apptive/fin/search/service/ProductDetailService.java:113 — Cognitive Complexity 27 / Cyclomatic Complexity 25
  • src/main/java/apptive/fin/myfin/service/MyFinService.java:216 — Cognitive Complexity 19 / Cyclomatic Complexity 10
  • src/main/java/apptive/fin/myfin/service/MyFinService.java:250 — Cognitive Complexity 16 / Cyclomatic Complexity 10
  • Duplicated block (16 lines): src/main/java/apptive/fin/calculator/service/DepositRateCalculator.java:46 ↔ src/main/java/apptive/fin/calculator/service/SavingRateCalculator.java:60

Informational report only — these metrics do not block merging.

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.

1 participant