-
Notifications
You must be signed in to change notification settings - Fork 2
[CHORE]: develop 브랜치 최신 변경사항 main 반영 #144
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
Changes from all commits
4294675
b83fc84
d6dc73a
d5a90b3
4860615
499b92f
b7f43e8
69cff59
bdd3dcf
d7bf7b0
cff7e89
073a21d
20ca6d2
4e815fa
ab2e1ea
a6d71ef
60f6178
d565be2
36f7def
9b777c4
3a40d70
0b5b503
41d4f09
5919a88
1ab6644
df78ea4
48125a9
ad456fd
54d3710
a32cd60
46eb507
a90a8a1
6d541f0
4afc999
4fbe5a8
30ae5a3
e5725e4
7abe68a
4422093
ba066f3
bac7d3c
97f49ef
03153e2
d0a576b
c22438e
8efbbf5
2076181
3601032
ba7fa01
f17b1ed
b179f6b
14435a5
af98092
d3824bd
771651a
2189d8b
3c7685b
3a2acd6
5f75ce1
60ef2cc
11bbf45
460b82c
1a2ef36
e0f0c7c
f8b0d1d
0a73ef8
17b86af
186b979
165b19b
e29373e
d8ad454
181bba0
ee69559
5064cce
7c8fb80
99b5233
3155f47
237c2f9
80cba3f
3edd7a9
529a552
1d0acb7
19e542e
4717113
0c155ad
10b2682
6d06836
dd596c0
5f333b3
ed49ff0
e080e75
1839046
94faf09
ae36c10
a6f9e71
5333ee7
19e6c43
73d45fa
db46b05
b73fe13
405ee87
50fe3bb
3f3cf6a
c63b64e
b2ccaa9
964c100
358a2a6
d406aed
9e65802
0cc15af
a36a456
034d59a
dde9022
68b751a
30128b5
49605db
c50801d
cd5cc8b
4a261c9
988ffd7
aca5023
824aa85
e0f5e63
a3e0385
ab20a8e
0c3ace4
6503e81
fa36abc
8213aae
d785902
4d018d9
d7ef215
d8cd5e1
70ae0d6
19229b0
ba65145
a2eaf70
b3248b4
b16474c
75cceb2
df092c2
a8600d3
9550479
dc981b6
171348c
19a42d2
1062914
3108c2a
9499e14
08eebc6
c9d6a8c
35be75b
3db6f18
732cbb8
1ec6d26
7905e85
e817808
50b2f21
f09b36d
d94dc1d
e57580f
7df4de9
82fb935
7d00784
a78d369
32df4a3
6e18973
64487d9
09ad692
27654a5
19517c2
8be0ee5
04de332
c37c8b0
eb03b8b
5ee8eba
350c98c
9466286
d1865b7
3e99e07
6e01492
635014d
bd3c656
e98b7bf
5945b0d
f395a4d
278f5e7
fd48817
429f91e
9586ebe
84ced95
eb3220e
4e709a7
6f2dbff
74b9d67
c1e7030
15b0d64
dd0329a
cd9d791
7f6d26d
2287aff
1d48fdf
352dc1a
07659dd
e38117a
88af538
f4c8e23
1e9f253
6003fcb
2cd4c13
f87b28b
c31ce87
6c01d63
df7a282
b0c9a6e
15dfdfe
eb7bef7
d3d9d23
c1f5fa3
f544f98
fc27035
5d8ee2f
5aa6b22
05d1c8b
9a2ae15
e68c6fa
7fa07ad
656236b
48d9dd5
6129508
81940b9
3ebd37a
fe84009
33e9284
bbca5db
3f6847c
bdfad23
efd8476
83db327
1609074
6a791aa
86f4806
a2300ee
c586afe
a87cb41
2fc7895
1be6928
e7c5297
5921ec5
080ab7c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,2 +1,257 @@ | ||||||||||||||
| # BE | ||||||||||||||
| Eatsfine-BackEnd | ||||||||||||||
| # 🍽️ Eatsfine BE | ||||||||||||||
|
|
||||||||||||||
| **Eatsfine 백엔드 레포지토리입니다.** | ||||||||||||||
|
|
||||||||||||||
| 🖇️**Service URL** | ||||||||||||||
| https://www.eatsfine.co.kr | ||||||||||||||
|
|
||||||||||||||
| 📚**API Documentation** | ||||||||||||||
| https://eatsfine.co.kr/swagger-ui/index.html | ||||||||||||||
|
|
||||||||||||||
| - Language: **Java 21** | ||||||||||||||
| - Framework: **Spring Boot 3.4.1** | ||||||||||||||
| - Database: **MySQL 8.0**, **Redis** | ||||||||||||||
| - ORM: **Spring Data JPA**, **QueryDSL 5.1.0** | ||||||||||||||
| - Security: **Spring Security**, **OAuth2 Client**, **JWT** | ||||||||||||||
| - Cloud & Infra: **AWS S3**, **Docker**, **GitHub Actions** | ||||||||||||||
| - Build Tool: **Gradle** | ||||||||||||||
|
|
||||||||||||||
| ## 🔥 Git Commit Convention (커밋 규칙) | ||||||||||||||
|
|
||||||||||||||
| 효율적인 협업을 위해 다음과 같은 커밋 메세지 규칙을 사용합니다. | ||||||||||||||
|
|
||||||||||||||
| **type은 대문자로 통일합니다.** | ||||||||||||||
|
|
||||||||||||||
| | 커밋 타입 | 설명 | | ||||||||||||||
| | ------------- | ------------------------------ | | ||||||||||||||
| | 🎉 `FEAT` | 새로운 기능 추가 | | ||||||||||||||
| | 🐛 `FIX` | 버그/오류 수정 | | ||||||||||||||
| | 🛠 `CHORE` | 코드/내부 파일/설정 수정 | | ||||||||||||||
| | 📝 `DOCS` | 문서 수정 (README 등) | | ||||||||||||||
| | 🔄 `REFACTOR` | 코드 리팩토링 (기능 변경 없음) | | ||||||||||||||
| | 🧪 `TEST` | 테스트 코드 추가/수정 | | ||||||||||||||
| | 🎨 `STYLE` | 스타일 변경(포맷, 세미콜론 등) | | ||||||||||||||
|
|
||||||||||||||
| 💻 **예시** | ||||||||||||||
|
|
||||||||||||||
| ```bash | ||||||||||||||
| git commit -m "[FEAT]: 예약 생성 API 구현" | ||||||||||||||
| git commit -m "[FIX]: OAuth2 로그인 리다이렉트 오류 수정" | ||||||||||||||
| git commit -m "[CHORE]: SecurityConfig CORS 설정 변경" | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ## 📁 폴더 구조 | ||||||||||||||
|
|
||||||||||||||
| <details> | ||||||||||||||
| <summary>폴더 구조 펼치기/접기</summary> | ||||||||||||||
|
|
||||||||||||||
| ```plaintext | ||||||||||||||
| src/main/java/com/eatsfine/eatsfine/ | ||||||||||||||
| ├── domain/ # 도메인별 비즈니스 로직 | ||||||||||||||
| │ ├── booking/ # 예약 관리 | ||||||||||||||
| │ ├── businesshours/ # 영업시간 관리 | ||||||||||||||
| │ ├── businessnumber/ # 사업자번호 검증 | ||||||||||||||
| │ ├── image/ # 이미지 처리 | ||||||||||||||
| │ ├── inquiry/ # 문의 관리 | ||||||||||||||
| │ ├── menu/ # 메뉴 관리 | ||||||||||||||
| │ ├── payment/ # 결제 시스템 | ||||||||||||||
| │ ├── region/ # 지역 관리 | ||||||||||||||
| │ ├── store/ # 식당 정보 관리 | ||||||||||||||
| │ ├── storetable/ # 식당 테이블 관리 | ||||||||||||||
| │ ├── table_layout/ # 테이블 배치도 | ||||||||||||||
| │ ├── tableblock/ # 테이블 블록 관리 | ||||||||||||||
| │ ├── tableimage/ # 테이블 이미지 | ||||||||||||||
| │ ├── term/ # 약관 관리 | ||||||||||||||
| │ └── user/ # 사용자(회원) 관리 | ||||||||||||||
| │ | ||||||||||||||
| └── global/ # 전역 설정 및 공통 모듈 | ||||||||||||||
| ├── annotation/ # 커스텀 어노테이션 | ||||||||||||||
| ├── apiPayload/ # 공통 응답/예외 처리 (ApiResponse) | ||||||||||||||
| ├── auth/ # 보안/인증 로직 (CustomHandler 등) | ||||||||||||||
| ├── common/ # 공통 유틸리티 | ||||||||||||||
| ├── config/ # 설정 파일 (Security, Swagger, QueryDSL 등) | ||||||||||||||
| ├── controller/ # 공통 컨트롤러 (HealthCheck) | ||||||||||||||
| ├── resolver/ # Argument Resolver | ||||||||||||||
| ├── s3/ # AWS S3 연동 | ||||||||||||||
| └── validator/ # 커스텀 검증기 | ||||||||||||||
| ``` | ||||||||||||||
| </details> | ||||||||||||||
|
Comment on lines
+77
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 코드 블록 전후 빈 줄 누락 (MD031). Lines 77–78과 Lines 245–246에서 닫는 코드 펜스( 📝 수정 제안Also applies to: 245-246 🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 77-77: Fenced code blocks should be surrounded by blank lines (MD031, blanks-around-fences) 🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 후행 공백 제거 필요 (MD009). Line 80에 불필요한 후행 공백이 1개 존재합니다. 해당 줄의 공백을 제거하거나 줄바꿈 의도라면 2칸으로 통일하세요. 🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 80-80: Trailing spaces (MD009, no-trailing-spaces) 🤖 Prompt for AI Agents |
||||||||||||||
| ## 🌿 Branch | ||||||||||||||
|
|
||||||||||||||
| - main : 배포/최종 안정 브랜치 **(직접 push 금지)** | ||||||||||||||
| - develop: 개발 통합 브랜치 (기본 작업 브랜치) | ||||||||||||||
| - 작업 브랜치 네이밍: | ||||||||||||||
| - `feat/booking-api` | ||||||||||||||
| - `fix/oauth-login` | ||||||||||||||
| - `chore/swagger-config` | ||||||||||||||
| - `refactor/payment-service` | ||||||||||||||
|
|
||||||||||||||
| ## 🎯 작업 루틴 | ||||||||||||||
|
|
||||||||||||||
| 기본 브랜치는 develop | ||||||||||||||
|
|
||||||||||||||
| 작업은 항상 `develop`에서 브랜치를 따서 진행하고, PR은 develop으로 올립니다. | ||||||||||||||
|
|
||||||||||||||
| ### 1. 작업 시작 전 (최신화) | ||||||||||||||
|
|
||||||||||||||
| ```bash | ||||||||||||||
| git checkout develop | ||||||||||||||
| git pull --rebase origin develop | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### 2. 작업 브랜치 생성 | ||||||||||||||
|
|
||||||||||||||
| ```bash | ||||||||||||||
| git checkout -b feat/featureName | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### 3. 작업 후 커밋 & 푸시 | ||||||||||||||
|
|
||||||||||||||
| ```bash | ||||||||||||||
| git add . # 필요하면 git add file명 으로 특정 파일만 추가해도 됨 | ||||||||||||||
| git commit -m "feat: 자세한 내용 적기" | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 커밋 예시 형식이 프로젝트 규칙과 다릅니다. Line 114의 예시 📝 수정 제안-git commit -m "feat: 자세한 내용 적기"
+git commit -m "[FEAT]: 자세한 내용 적기"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| git push -u origin feat/featureName | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### 4. PR 생성 | ||||||||||||||
|
|
||||||||||||||
| - feat/<featureName> → develop 로 PR 생성 | ||||||||||||||
| - PR 본문에 Closes #이슈번호 작성해서 merge 시 이슈가 자동으로 닫히도록 설정 | ||||||||||||||
|
|
||||||||||||||
| ```md | ||||||||||||||
| Closes #이슈번호 | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### 5. 리뷰 & 머지 | ||||||||||||||
|
|
||||||||||||||
| - 최소 2명 승인 후 merge | ||||||||||||||
| - main은 배포/최종용 브랜치이기에 **직접 push 금지** | ||||||||||||||
|
|
||||||||||||||
| ## 🔒 보안 | ||||||||||||||
|
|
||||||||||||||
| - `application.yml` 및 민감정보는 절대 커밋 금지 | ||||||||||||||
| - 공유가 필요한 환경변수는 `application-local.yml` 등을 통해 관리하거나 노션/슬랙을 통해 공유합니다. | ||||||||||||||
|
|
||||||||||||||
| ## 👥 팀 규칙 | ||||||||||||||
|
|
||||||||||||||
| - **작업 시작전 develop 최신화: git pull --rebase origin develop** | ||||||||||||||
| - PR은 가능한 작게 쪼개서 올리기 | ||||||||||||||
| - PR에 작업 요약 + 테스트 결과 포함하기 | ||||||||||||||
| - 충돌 발생 시 브랜치에서 먼저 해결 후 PR 업데이트 | ||||||||||||||
|
|
||||||||||||||
| ## 🛠️ 팀원 정보 ## | ||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ATX-closed 헤딩 스타일 사용 (MD003). Line 144의 📝 수정 제안-## 🛠️ 팀원 정보 ##
+## 🛠️ 팀원 정보📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 144-144: Heading style (MD003, heading-style) 🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| | 이름 | 주요 담당 업무 | | ||||||||||||||
| | --------- |-----------------------------------------------------| | ||||||||||||||
| | 민토리 / 성민주 | 회원/인증, JWT 등 공통 보안 설정, 공통 응답 + 예외 처리 | | ||||||||||||||
| | 앤디 / 박영찬 | CI/CD, 토스 페이먼츠 결제 위젯 연동, 1:1 문의 | | ||||||||||||||
| | 영도 / 이도영 | 식당 도메인, OpenAPI 활용 사업자 인증, RBAC 기반 권한 제어, AWS S3 연동 | | ||||||||||||||
| | 준 / 손준규 | 식당 배치도, 테이블 CRUD 개발 및 테이블별 예약 가능 시간대 관리 | | ||||||||||||||
| | 누리 / 정준영 | 예약 도메인 개발, 결제 프로세스와 연동 | | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| ## 💡 시작 방법 | ||||||||||||||
|
|
||||||||||||||
| ### 1. Clone & Install | ||||||||||||||
|
|
||||||||||||||
| ```bash | ||||||||||||||
| git clone https://github.com/Eatsfine/BE.git | ||||||||||||||
| cd eatsfine-be | ||||||||||||||
| ./gradlew clean build | ||||||||||||||
|
Comment on lines
+160
to
+162
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
📝 수정 제안 git clone https://github.com/Eatsfine/BE.git
-cd eatsfine-be
+cd BE
./gradlew clean build📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### 2. Environment Values | ||||||||||||||
|
|
||||||||||||||
| DB 접속 정보 및 외부 API 키 등은 환경변수 또는 로컬 설정 파일로 관리합니다. | ||||||||||||||
| `src/main/resources/application-local.yml`을 생성하여 필요한 설정을 추가하세요. | ||||||||||||||
|
|
||||||||||||||
| <details> | ||||||||||||||
| <summary>폴더 구조 펼치기/접기</summary> | ||||||||||||||
|
Comment on lines
+170
to
+171
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Line 171의 요약 텍스트가 "폴더 구조 펼치기/접기"로 되어 있으나, 내부 내용은 📝 수정 제안- <summary>폴더 구조 펼치기/접기</summary>
+ <summary>application-local.yml 예시 펼치기/접기</summary>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| ```yaml | ||||||||||||||
| server: | ||||||||||||||
| port: 8080 | ||||||||||||||
| profile: local | ||||||||||||||
|
|
||||||||||||||
| spring: | ||||||||||||||
| config: | ||||||||||||||
| activate: | ||||||||||||||
| on-profile: local | ||||||||||||||
| datasource: | ||||||||||||||
| url: jdbc:mysql://${DB_HOST}:${DB_PORT}/${DB_NAME}?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&serverTimezone=Asia/Seoul | ||||||||||||||
| username: ${DB_USERNAME} | ||||||||||||||
| password: ${DB_PASSWORD} | ||||||||||||||
| driver-class-name: com.mysql.cj.jdbc.Driver | ||||||||||||||
| data: | ||||||||||||||
| redis: | ||||||||||||||
| host: ${REDIS_HOST} | ||||||||||||||
| port: ${REDIS_PORT} | ||||||||||||||
| jpa: | ||||||||||||||
| hibernate: | ||||||||||||||
| ddl-auto: update | ||||||||||||||
| show-sql: true | ||||||||||||||
| properties: | ||||||||||||||
| hibernate: | ||||||||||||||
| format_sql: true | ||||||||||||||
| security: | ||||||||||||||
| oauth2: | ||||||||||||||
| client: | ||||||||||||||
| registration: | ||||||||||||||
| google: | ||||||||||||||
| client-id: ${GOOGLE_CLIENT_ID} | ||||||||||||||
| client-secret: ${GOOGLE_CLIENT_SECRET} | ||||||||||||||
| scope: | ||||||||||||||
| - profile | ||||||||||||||
| redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}" | ||||||||||||||
| authorization-grant-type: authorization_code | ||||||||||||||
| kakao: | ||||||||||||||
| client-id: ${KAKAO_CLIENT_ID} | ||||||||||||||
| client-secret: ${KAKAO_CLIENT_SECRET} | ||||||||||||||
| scope: | ||||||||||||||
| - profile_nickname | ||||||||||||||
| - profile_image | ||||||||||||||
| - account_email | ||||||||||||||
| redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}" | ||||||||||||||
| authorization-grant-type: authorization_code | ||||||||||||||
| client-name: Kakao | ||||||||||||||
| provider: kakao | ||||||||||||||
| provider: | ||||||||||||||
| google: | ||||||||||||||
| authorization-uri: https://accounts.google.com/o/oauth2/v2/auth | ||||||||||||||
| token-uri: https://oauth2.googleapis.com/token | ||||||||||||||
| user-info-uri: https://www.googleapis.com/oauth2/v3/userinfo | ||||||||||||||
| kakao: | ||||||||||||||
| authorization-uri: https://kauth.kakao.com/oauth/authorize | ||||||||||||||
| token-uri: https://kauth.kakao.com/oauth/token | ||||||||||||||
| user-info-uri: https://kapi.kakao.com/v2/user/me | ||||||||||||||
| user-name-attribute: id | ||||||||||||||
|
|
||||||||||||||
| payment: | ||||||||||||||
| toss: | ||||||||||||||
| widget-secret-key: ${TOSS_WIDGET_SECRET_KEY} | ||||||||||||||
|
|
||||||||||||||
| cloud: | ||||||||||||||
| aws: | ||||||||||||||
| region: ${AWS_REGION} | ||||||||||||||
| s3: | ||||||||||||||
| bucket: ${AWS_S3_BUCKET} | ||||||||||||||
| base-url: ${AWS_S3_BASE_URL} | ||||||||||||||
|
|
||||||||||||||
| jwt: | ||||||||||||||
| secret: ${SECRET_KEY} | ||||||||||||||
| ``` | ||||||||||||||
| </details> | ||||||||||||||
|
|
||||||||||||||
| ### 3. Run | ||||||||||||||
|
|
||||||||||||||
| ```bash | ||||||||||||||
| ./gradlew bootRun | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### 4. API Docs (Swagger) | ||||||||||||||
|
|
||||||||||||||
| 서버 실행 후 아래 주소로 접속하여 API 명세를 확인할 수 있습니다. | ||||||||||||||
| - Local: http://localhost:8080/swagger-ui/index.html | ||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,13 +1,21 @@ | ||||||||||||||||||||
| package com.eatsfine.eatsfine.domain.businessnumber.dto; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| import io.swagger.v3.oas.annotations.media.Schema; | ||||||||||||||||||||
| import jakarta.validation.constraints.NotBlank; | ||||||||||||||||||||
| import jakarta.validation.constraints.Pattern; | ||||||||||||||||||||
| import jakarta.validation.constraints.Size; | ||||||||||||||||||||
| import lombok.Builder; | ||||||||||||||||||||
|
|
||||||||||||||||||||
| public class BusinessNumberReqDto { | ||||||||||||||||||||
|
|
||||||||||||||||||||
| @Builder | ||||||||||||||||||||
| public record BusinessNumberDto( | ||||||||||||||||||||
|
|
||||||||||||||||||||
| @Schema(description = "이름", example = "홍길동") | ||||||||||||||||||||
| @NotBlank(message = "이름은 필수입니다.") | ||||||||||||||||||||
| @Size(min = 2, max = 20, message = "이름은 2자 이상 20자 이내여야 합니다.") | ||||||||||||||||||||
| String name, | ||||||||||||||||||||
|
Comment on lines
+14
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial
✏️ 제안 수정+ `@Pattern`(regexp = "^[가-힣a-zA-Z\\s]{2,20}$", message = "이름은 한글 또는 영문만 입력 가능합니다.")
`@Size`(min = 2, max = 20, message = "이름은 2자 이상 20자 이내여야 합니다.")
String name,As per coding guidelines, 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
|
|
||||||||||||||||||||
| @NotBlank(message = "사업자번호는 필수입니다.") | ||||||||||||||||||||
| @Pattern(regexp = "^[0-9]{10}$", message = "사업자번호는 숫자 10자리여야 합니다.") | ||||||||||||||||||||
| String businessNumber, | ||||||||||||||||||||
|
|
||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,7 +55,7 @@ public StoreResDto.StoreCreateDto createStore(StoreReqDto.StoreCreateDto dto, St | |
| businessNumberValidator.validate( | ||
| dto.businessNumberDto().businessNumber(), | ||
| dto.businessNumberDto().startDate(), | ||
| user.getName()); | ||
| dto.businessNumberDto().name()); | ||
|
Comment on lines
55
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial
Line 58의 변경( 추가로, 💡 개선 방향 예시// 외부 API 검증을 트랜잭션 시작 전에 수행하도록 분리
// Option: `@Transactional`(propagation = Propagation.REQUIRES_NEW) 별도 메서드,
// 또는 createStore 내에서 validate() 후 트랜잭션 시작🤖 Prompt for AI Agents |
||
|
|
||
| log.info("사업자 번호 검증 성공: {}", dto.businessNumberDto().businessNumber()); | ||
|
|
||
|
|
||
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.
docker system prune -a -f의-a플래그가 과도하게 공격적이며, 실행 위치도 최적이 아닙니다.두 가지 문제가 있습니다.
1.
-a플래그 — 다른 서비스 이미지 제거 위험docker system prune -a -f는 실행 중인 컨테이너에 연결된 이미지를 제외하고 모든 미사용 이미지를 삭제합니다. EC2 호스트에 다른 Docker 서비스(예: nginx, DB 등)가 존재하고 해당 컨테이너가 배포 시점에 잠시라도 중지되어 있다면, 해당 서비스의 이미지가 영구적으로 삭제됩니다.불필요한 레이어(dangling 이미지)만 제거하려면
-a없이 사용하거나docker image prune -f로 범위를 제한하는 것이 안전합니다.2. 실행 위치 — 현재 배포의 구 이미지가 정리되지 않음
현재 실행 순서:
docker system prune -a -f← 컨테이너가 아직 실행 중이므로eatsfine-be:latest이미지는 보호됨docker pull← 새 이미지가latest태그를 가져가고, 구 이미지는 dangling 상태가 됨docker compose down/up -d즉, 이번 배포에서 생긴 dangling 구 이미지는 이미 prune이 끝난 뒤 발생하기 때문에 다음 배포 때까지 디스크에 남습니다. 이전 방식(
docker compose down이후 prune)이 오히려 같은 사이클 내에서 구 이미지를 정리하는 데 더 효과적이었습니다.아래와 같이 수정하면 두 문제를 모두 완화할 수 있습니다.
🛠️ 제안된 수정안
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/eatsfine-be:latest docker compose down + + # 불필요한 dangling 이미지 및 중지된 컨테이너 정리 (다른 서비스 이미지는 유지) + docker system prune -f || true + docker compose up -d docker ps-a제거: dangling 이미지만 삭제하여 다른 서비스 이미지를 보호합니다.docker compose down이후로 이동: 구 이미지가 dangling 상태가 된 직후 같은 사이클 내에서 정리됩니다.🤖 Prompt for AI Agents