Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
0b5294b
chore: README.md만 남기고 불필요 파일 트래킹 해제
project36bys Aug 26, 2025
2c458c5
Merge remote-tracking branch 'upstream/dev' into chore/remove-applica…
meraki6512 Aug 26, 2025
99255a6
Merge remote-tracking branch 'upstream/dev' into feature/2-issue-crud…
meraki6512 Aug 26, 2025
7cf3574
Merge pull request #10 from meraki6512/feature/2-issue-crud-api
meraki6512 Aug 26, 2025
ca53c7f
Merge pull request #11 from meraki6512/chore/remove-application-prope…
meraki6512 Aug 26, 2025
d03370a
[#12] feat: 이슈 상태 변경 API 구현 및 예외 처리 추가
meraki6512 Aug 26, 2025
6dc2a68
[#12] test: 이슈 상태 변경 API 단위 및 통합 테스트 추가
meraki6512 Aug 26, 2025
d119246
Merge pull request #13 from meraki6512/feature/12-issue-status-api
meraki6512 Aug 26, 2025
e74130a
feat: Label create & get
tpgus1221 Aug 27, 2025
2d795e7
refactor: example로 디렉터리 변경 및 코드 구조 통일
tpgus1221 Aug 27, 2025
20d87e6
feat: Label CRUD 기능 구현
tpgus1221 Aug 27, 2025
c4de34d
Merge branch 'dev' into feature/label
tpgus1221 Aug 27, 2025
6c9f226
Merge pull request #16 from tpgus1221/feature/label
tpgus1221 Aug 27, 2025
44187ad
ì임시 커밋
sungchaelee Aug 27, 2025
a78069b
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Aug 27, 2025
c334daf
[#14] feat: QueryDSL 기반 이슈 다중 필터링 및 페이징 조회 API 구현
meraki6512 Aug 27, 2025
c533719
[IssueDiver#18] chore: application.properties 추적 제거 및 .gitignore에서 .y…
tpgus1221 Aug 27, 2025
37fd80d
Merge pull request #19 from tpgus1221/chore/application-properties
tpgus1221 Aug 27, 2025
68d9ce4
[#14] feat: 이슈 필터링 기능 관련 단위/통합 테스트 환경 구축
meraki6512 Aug 27, 2025
208a0d2
Merge branch 'dev' into feature/14-get-issues-api
meraki6512 Aug 27, 2025
d7db05a
Merge pull request #20 from meraki6512/feature/14-get-issues-api
meraki6512 Aug 27, 2025
a86b9b7
[#22] chore: 프로젝트 구조 교체 및 기본 설정 파일 재생성
meraki6512 Aug 27, 2025
788ed54
[#22] chore: .gitignore에 application.properties 추가 및 캐시 제거
meraki6512 Aug 27, 2025
078d17d
[#22] chore: build.gradle dependencies 추가 및 환경 설정 추가
meraki6512 Aug 27, 2025
7820012
Merge pull request #23 from meraki6512/chore/22-fix-build-env
meraki6512 Aug 27, 2025
b857b18
[#21] chore: springdoc 관련 의존성 업데이트 및 설정 수정
meraki6512 Aug 27, 2025
2a81b92
Merge pull request #24 from meraki6512/chore/21-api-docs
meraki6512 Aug 27, 2025
c42970b
[#25] chore: CI 파이프라인 기본 워크플로우 설정 추가
meraki6512 Aug 27, 2025
c338bad
Merge pull request #26 from meraki6512/chore/25-ci
meraki6512 Aug 28, 2025
edc4da9
[#1] feat: Comment 기능 개발
sungchaelee Aug 28, 2025
81c826e
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Aug 28, 2025
1623197
[#1] Feat: Comment API 구현
sungchaelee Aug 28, 2025
3875582
[#1] Feat: Comment API 구현
sungchaelee Aug 28, 2025
c872b0e
[#1] Feat: Comment API 구현
sungchaelee Aug 28, 2025
99ce0b2
[#1] fix: 댓글 조회 기능 및 엔티티 버그 수정
sungchaelee Aug 28, 2025
51025ac
[#31] chore: 임시 백엔드 수정 스냅샷 저장
meraki6512 Aug 28, 2025
4a907b1
[#32] chore: CI - Docker 및 Docker Compose 환경 설정 완료
meraki6512 Aug 28, 2025
8dd43b2
Merge pull request #33 from meraki6512/chore/32-docker-ci-setup
meraki6512 Aug 28, 2025
a433a31
Merge branch 'dev' of https://github.com/meraki6512/IssueDive into ch…
meraki6512 Aug 28, 2025
8d9a6ef
[#1] feat: Comment 테스트코드 추가
sungchaelee Aug 29, 2025
52c4e9b
git rebase --edit-todoMerge pull request #33 from meraki6512/chore/32…
meraki6512 Aug 28, 2025
33bb301
[#1] feat: Comment 테스트 코드 추가
sungchaelee Aug 29, 2025
3d8dc6a
[#1] feat: Comment 테스트 코드 추가
sungchaelee Aug 29, 2025
e1e7217
[#34] fix: CommentResponse 오류 수정
sungchaelee Aug 29, 2025
2bfc036
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Aug 29, 2025
bf0e3a3
[#15] feat: Auth API 구현 + Security 최소 설정
project36bys Aug 27, 2025
a7d36aa
chore(security): stop tracking application-dev.properties (local only)
project36bys Aug 28, 2025
b5dfee5
[#15] refactor: created_at/updated_at DB default 제거, JPA @PrePersist/…
project36bys Aug 28, 2025
bb3c4ed
[#32] resolve docker CI build errors
meraki6512 Aug 29, 2025
edb53d7
Merge pull request #36 from meraki6512/chore/32-docker-ci-setup-fix
meraki6512 Aug 29, 2025
2f24770
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Aug 29, 2025
05ce675
feat: comment API 개발
sungchaelee Aug 29, 2025
342f491
[#1] feat: Comment API 개발
sungchaelee Aug 29, 2025
9731d98
[#15] fix: SecurityConfig 경로 및 CSRF 설정 수정- /auth/signup 요청 시 HTML 로그인…
project36bys Aug 29, 2025
c418174
Merge branch 'dev' into feature/15-auth-api-security-minimum
soyeonkim8888 Aug 29, 2025
7cae5bd
[#17]feat: 이슈-라벨 매핑 기능 구현
tpgus1221 Aug 29, 2025
2161cc0
[#31] chore: 프론트엔드 연동 오류 해결을 위한 백엔드 수정
meraki6512 Aug 29, 2025
16ccc0b
Merge branch 'dev' into chore/31-backend-fix-snapshot
meraki6512 Aug 29, 2025
bb9da1a
[#32, #31] fix: 프론트 연동을 위한 CI 충돌 해결 및 백엔드 수정
meraki6512 Aug 29, 2025
7519701
[#15] fix(security): SecurityConfig 접근 권한 수정
project36bys Aug 29, 2025
1a46f18
[#15] Fix: User 엔티티 기본 생성자 public으로 변경 (테스트 빌드 오류 수정)
project36bys Aug 29, 2025
4e86180
[#32, #31] fix: CI 실행 시 DB 환경 변수 주입
meraki6512 Aug 29, 2025
f94468e
[#32, #31] fix: 프론트 연동을 위한 CI 충돌 해결 및 백엔드 수정 - DB 접속 오류 해결
meraki6512 Aug 29, 2025
0ccecc9
Merge pull request #29 from soyeonkim8888/feature/15-auth-api-securit…
soyeonkim8888 Aug 29, 2025
eecb752
Merge branch 'dev' into feature/issue-label
tpgus1221 Aug 29, 2025
2f22816
Merge branch 'dev' into feature/issue-label
tpgus1221 Aug 29, 2025
64e2983
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Aug 29, 2025
cfddca5
Merge pull request #42 from tpgus1221/feature/issue-label
tpgus1221 Aug 29, 2025
d497ec2
[#32, #31] fix: CI 환경에 MySQL 서비스 추가하여 테스트 오류 해결
meraki6512 Aug 29, 2025
d7816fc
Merge branch 'dev' into chore/31-backend-fix-snapshot
meraki6512 Aug 29, 2025
1201c6c
[#38] Feat: GET /auth/users 엔드포인트 추가 (사용자 목록 조회)
project36bys Aug 29, 2025
88be2c8
[#32, #31] chore: Trigger CI re-run
meraki6512 Aug 29, 2025
2756012
Merge branch 'chore/31-backend-fix-snapshot' of https://github.com/me…
meraki6512 Aug 29, 2025
6c62d30
Merge pull request #41 from soyeonkim8888/feature/38-auth-get-users
soyeonkim8888 Aug 29, 2025
b258019
[#1] feat: Comment API 개발
sungchaelee Aug 29, 2025
5cd7b34
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Aug 29, 2025
a9284fb
[#32, #31] chore: CI 실행 시 Secrets 권한에 따른 문제 해결
meraki6512 Aug 29, 2025
57d728f
Merge pull request #40 from meraki6512/chore/31-backend-fix-snapshot
meraki6512 Aug 29, 2025
1d59a0b
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Aug 29, 2025
ac6cd01
[#32, #25] chore: Docker 기반 CI 문제 해결
meraki6512 Aug 29, 2025
dd4d11b
[#32, #25] chore: Docker 기반 CI 문제 해결 - DB URL 수정
meraki6512 Aug 29, 2025
96bd3c5
[#30] Test: AuthController/UserService/GlobalExceptionHandler 단위 테스트 추가
project36bys Aug 29, 2025
d4b2a8d
[#32, #25] chore: Docker 기반 CI 문제 해결 - secrets 임시로 삭제
meraki6512 Aug 29, 2025
015ed58
[#32, #25] chore: ci-docker.yml 수정
meraki6512 Aug 29, 2025
b57bd2b
[#32, #25] chore: ci-docker.yml 수정
meraki6512 Aug 29, 2025
5905245
[#32, #25] chore: ci-docker.yml 수정
meraki6512 Aug 29, 2025
dad6ab6
[#32, #25] chore: ci-docker.yml 수정
meraki6512 Aug 29, 2025
b45080a
[#32, #25] chore: build.gradle 수정
meraki6512 Aug 29, 2025
6ddb119
Merge pull request #43 from meraki6512/chore/32-refactor-ci
meraki6512 Aug 29, 2025
34800a9
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Aug 29, 2025
4d4d3a8
[#1] fix: GlobalExceptionHandler 수정
sungchaelee Aug 29, 2025
a018ad8
Merge pull request #37 from sungchaelee/feature/1-comment-api
sungchaelee Aug 29, 2025
1d4e702
[#30] Test+Chore: GlobalExceptionHandler 테스트 추가 및 Flyway 설정 보정
project36bys Aug 30, 2025
73cb478
Merge branch 'dev' into feature/30-auth-unit-test
soyeonkim8888 Aug 30, 2025
6ae5bd9
Merge pull request #44 from soyeonkim8888/feature/30-auth-unit-test
soyeonkim8888 Aug 30, 2025
3b680cd
[#45] chore: DB entity 테이블명 및 필드명 일치, gitignore cache 제거
meraki6512 Sep 1, 2025
b028509
Merge pull request #46 from meraki6512/chore/45-api-integration-test
meraki6512 Sep 1, 2025
6dda19b
test: label 테스트 코드
tpgus1221 Sep 1, 2025
8ef9e41
Merge pull request #48 from tpgus1221/test/label
tpgus1221 Sep 1, 2025
c3d6ff6
[#21] docs: Swagger API 문서 추가
sungchaelee Sep 1, 2025
7728dad
[#21] docs: Swagger API 문서 추가
sungchaelee Sep 1, 2025
733cc3e
[#47, #45] feat: JWT 인증 전 임시 사용자 ID 적용
meraki6512 Sep 1, 2025
de4348f
Merge pull request #49 from meraki6512/chore/45-api-integration-test
meraki6512 Sep 1, 2025
f04f080
[#45] fix: patch API 관련 버그 수정 및 서비스 로직 개선
meraki6512 Sep 1, 2025
f2279d3
[#45] fix: UpdateIssueRequest 변경에 따른 IssueServiceTest 테스트 코드 수정
meraki6512 Sep 1, 2025
2e3e32a
feature/47 JWT authentication
project36bys Sep 1, 2025
72da8cc
[#45] fix: UpdateIssueRequest 변경에 따른 IssueServiceTest 테스트 코드 수정
meraki6512 Sep 1, 2025
5b37407
[#45] fix: 임시 사용자 설정에 따른 CommentControllerTest 테스트 코드 수정
meraki6512 Sep 1, 2025
0335911
Merge pull request #50 from meraki6512/chore/45-api-integration-test
meraki6512 Sep 1, 2025
dad4d49
[#45] fix: patch API 관련 버그 수정 및 서비스 로직 개선
meraki6512 Sep 1, 2025
5ddf620
[#45] fix: UpdateIssueRequest 변경에 따른 IssueServiceTest 테스트 코드 수정
meraki6512 Sep 1, 2025
1ebf207
[#45] fix: UpdateIssueRequest 변경에 따른 IssueServiceTest 테스트 코드 수정
meraki6512 Sep 1, 2025
9933f69
[#45] fix: 임시 사용자 설정에 따른 CommentControllerTest 테스트 코드 수정
meraki6512 Sep 1, 2025
a46974c
feature/47 불필요한 exception 제거
project36bys Sep 2, 2025
a8e23ae
Merge pull request #51 from soyeonkim8888/feature/47-JWT-Auth
soyeonkim8888 Sep 2, 2025
a2ab0e1
[#21] feat: Swagger 작성
sungchaelee Sep 2, 2025
6db22e9
[#54, #45] feat: API 전반에 JWT 기반 사용자 인증 적용
meraki6512 Sep 2, 2025
87654dc
Merge pull request #55 from meraki6512/chore/45-api-integration-test
meraki6512 Sep 2, 2025
c4a6fc3
[#21] feat: Swagger 작성
sungchaelee Sep 2, 2025
c4615ef
[#21] feat: Swagger 작성
sungchaelee Sep 2, 2025
c86f246
[#21] feat: Swagger 작성
sungchaelee Sep 2, 2025
f6ee062
feature/53-JWT-Junit-test: JwtUtilTest + AuthContorllerTest 추가
project36bys Sep 2, 2025
507e2cd
[#56] chore: CI 개선
meraki6512 Sep 2, 2025
f61ea93
Merge pull request #59 from meraki6512/chore/56-ci-cd
meraki6512 Sep 2, 2025
0a485c7
feature/53-JWT-junit-test JwtAuthenticationFilterTest + SecurityConfi…
project36bys Sep 2, 2025
8b9c071
Merge branch 'dev' into feature/53-JWT-junit-test
soyeonkim8888 Sep 2, 2025
5ba11c3
Merge pull request #60 from soyeonkim8888/feature/53-JWT-junit-test
soyeonkim8888 Sep 2, 2025
adedf4e
[#21] feat: Swagger 작성
sungchaelee Sep 3, 2025
d2d3a2c
[#57] chore: 모니터링 환경 구축
sungchaelee Sep 3, 2025
a8244d6
Merge branch 'dev' of https://github.com/sungchaelee/IssueDive into f…
sungchaelee Sep 3, 2025
00ee06b
Merge pull request #61 from sungchaelee/feature/1-comment-api
sungchaelee Sep 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
35 changes: 35 additions & 0 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: IssueDive Docker CI

on:
push:
branches: [ "dev" ] # dev 브랜치에 푸시될 때 실행

jobs:
build-and-push:
name: Build and Push to Docker Hub
runs-on: ubuntu-latest
steps:
# 1. 소스 코드 체크아웃
- name: Checkout source code
uses: actions/checkout@v4

# 2. Docker Buildx 설정 (Docker 빌드 성능 향상)
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# 3. Docker Hub 로그인
# GitHub Secrets에 저장된 정보를 이용해 Docker Hub에 로그인합니다.
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# 4. Docker 이미지 빌드 및 푸시
# 빌드 과정에서 테스트가 실행되고, 성공하면 이미지를 Docker Hub에 푸시합니다.
- name: Build and push
uses: docker/build-push-action@v5
with:
context: . # Dockerfile이 있는 위치
push: true # Docker Hub로 푸시 활성화
tags: ${{ secrets.DOCKERHUB_USERNAME }}/issuedive:latest # "DockerHub계정명/이미지명:태그" 형식
40 changes: 40 additions & 0 deletions .github/workflows/ci-yml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 워크플로우의 이름
name: IssueDive CI

# 워크플로우가 언제 실행될지 정의
on:
push:
branches: [ "dev" ] # dev 브랜치에 push될 때 실행
pull_request:
branches: [ "dev" ] # dev 브랜치로 Pull Request가 생성될 때 실행

# 실행될 작업(Job)들을 정의
jobs:
build-and-test: # 작업의 ID
name: Build and Test # 작업의 이름 (GitHub Actions UI에 표시됨)
runs-on: ubuntu-latest # 작업을 실행할 가상 머신 환경 (Ubuntu 최신 버전)

# 작업의 단계(Step)들을 정의
steps:
# 1. 소스 코드 체크아웃
# GitHub Actions가 우리 저장소의 코드에 접근할 수 있도록 내려받는 단계
- name: Checkout source code
uses: actions/checkout@v4

# 2. JDK 17 설치
# build.gradle에 설정된 Java 17 버전으로 빌드 환경을 설정
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# 3. gradlew 파일에 실행 권한 부여
# 예전에 겪었던 'permission denied' 문제를 방지하기 위해 꼭 필요!
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

# 4. Gradle로 빌드 및 테스트 실행
# 이 명령어가 성공하면 CI 성공, 실패하면 CI 실패
- name: Build with Gradle
run: ./gradlew build
18 changes: 17 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,20 @@ out/
### VS Code ###
.vscode/

src/main/resources/application.properties
# Application Properties
application.properties
application-test.properties
application-dev.properties

.secrets
.env
.java-version
logs/
gradle.properties
.env.local
.env.*.local

# JWT 시크릿 키나 API 키가 포함된 파일
**/secrets.properties
**/*.secret
**/jwt.properties
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 1. 빌드 및 테스트 스테이지
FROM gradle:8.8.0-jdk17 AS builder

WORKDIR /app

# Gradle 캐시 최적화를 위해 의존성 관련 파일 먼저 복사
COPY build.gradle settings.gradle gradlew ./
COPY gradle ./gradle

# 의존성 다운로드 (네트워크를 사용하는 단계이므로 먼저 실행)
RUN ./gradlew --no-daemon dependencies

# 전체 소스 복사
COPY src ./src

# assemble 대신 build 명령어를 사용해 테스트까지 함께 실행합니다.
# Spring Boot의 테스트 프로필을 활성화하여 H2 DB를 사용하도록 합니다.
RUN ./gradlew build --no-daemon -Dspring.profiles.active=test


# 2. 실행 스테이지
FROM openjdk:17-jdk-slim

WORKDIR /app

# 빌드 산출물(테스트가 통과된)을 복사
COPY --from=builder /app/build/libs/*.jar app.jar

# 컨테이너 실행
ENTRYPOINT ["java", "-jar", "app.jar"]
47 changes: 47 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Gradle documentation](https://docs.gradle.org)
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/3.5.5/gradle-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.5.5/gradle-plugin/packaging-oci-image.html)
* [Spring Boot Testcontainers support](https://docs.spring.io/spring-boot/3.5.5/reference/testing/testcontainers.html#testing.testcontainers)
* [Testcontainers MySQL Module Reference Guide](https://java.testcontainers.org/modules/databases/mysql/)
* [Spring Web](https://docs.spring.io/spring-boot/3.5.5/reference/web/servlet.html)
* [Validation](https://docs.spring.io/spring-boot/3.5.5/reference/io/validation.html)
* [Spring Security](https://docs.spring.io/spring-boot/3.5.5/reference/web/spring-security.html)
* [Spring Data JPA](https://docs.spring.io/spring-boot/3.5.5/reference/data/sql.html#data.sql.jpa-and-spring-data)
* [Flyway Migration](https://docs.spring.io/spring-boot/3.5.5/how-to/data-initialization.html#howto.data-initialization.migration-tool.flyway)
* [Spring Boot Actuator](https://docs.spring.io/spring-boot/3.5.5/reference/actuator/index.html)
* [Testcontainers](https://java.testcontainers.org/)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
* [Validation](https://spring.io/guides/gs/validating-form-input/)
* [Securing a Web Application](https://spring.io/guides/gs/securing-web/)
* [Spring Boot and OAuth2](https://spring.io/guides/tutorials/spring-boot-oauth2/)
* [Authenticating a User with LDAP](https://spring.io/guides/gs/authenticating-ldap/)
* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
* [Building a RESTful Web Service with Spring Boot Actuator](https://spring.io/guides/gs/actuator-service/)
* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/)

### Additional Links
These additional references should also help you:

* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle)

### Testcontainers support

This project uses [Testcontainers at development time](https://docs.spring.io/spring-boot/3.5.5/reference/features/dev-services.html#features.dev-services.testcontainers).

Testcontainers has been configured to use the following Docker images:

* [`mysql:latest`](https://hub.docker.com/_/mysql)

Please review the tags of the used images and set them to the same as you're running in production.

2 changes: 0 additions & 2 deletions README.md

This file was deleted.

123 changes: 94 additions & 29 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,48 +1,113 @@
// buildscript 블록
// 플러그인 자체와, 플러그인이 사용할 MySQL 라이브러리를 함께 정의.
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
def flywayVersion = "11.11.2"
classpath "org.flywaydb:flyway-gradle-plugin:${flywayVersion}"
classpath "org.flywaydb:flyway-mysql:${flywayVersion}"
}
}

plugins {
id 'java'
id 'org.springframework.boot' version '3.5.5'
id 'io.spring.dependency-management' version '1.1.7'
id 'java'
id 'org.springframework.boot' version '3.5.5'
id 'io.spring.dependency-management' version '1.1.7'
// id 'org.flywaydb.flyway' version "11.11.2"
}

group = 'com.example'
// buildscript에 정의한 플러그인 적용.
apply plugin: 'org.flywaydb.flyway'

group = 'com.issueDive'
version = '0.0.1-SNAPSHOT'
description = 'Demo project for Spring Boot'
description = 'issueDive'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

configurations {
compileOnly {
extendsFrom annotationProcessor
}
compileOnly {
extendsFrom annotationProcessor
}
}

repositories {
mavenCentral()
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-mysql'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:mysql'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.flywaydb:flyway-core'
implementation 'org.flywaydb:flyway-mysql'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.security:spring-security-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:mysql'
testImplementation 'com.h2database:h2'
// flywayPlugin 'org.flywaydb:flyway-mysql' // flywayClean 같은 명령어 직접 사용 시 필요. 라이브러리 지정.

// QueryDsl
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"

// API docs
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.11'

runtimeOnly 'com.h2database:h2'

// JWT 의존성 추가
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// @MockitoBean 지원을 위한 의존성
testImplementation 'org.springframework.boot:spring-boot-testcontainers'
testImplementation 'org.mockito:mockito-core:5.11.0'

// Spring Boot Actuator
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// Micrometer (Prometheus 연동을 위함)
implementation 'io.micrometer:micrometer-registry-prometheus'
}

// Query DSL 설정
clean{
delete file('src/main/generated')
}

tasks.named('test') {
useJUnitPlatform()
useJUnitPlatform()
jvmArgs '-Xshare:off'
}

// Flyway 설정
flyway {
// project.hasProperty()를 사용해 'dbUrl' 프로퍼티가 있을 때만 설정을 적용합니다.
// 이렇게 하면 CI 환경처럼 DB 정보가 없을 때 이 블록을 건너뛰게 됩니다.
// CI 환경 등에서 dbUrl 프로퍼티가 없을 수 있으므로,
// 해당 프로퍼티가 존재할 때만 url, user, password를 설정합니다.
if (project.hasProperty('dbUrl')) {
url = dbUrl
user = dbUser
password = dbPassword
}
locations = ['filesystem:src/main/resources/db/migration']
// cleanDisabled는 DB 연결 정보와 무관하므로 바깥에 두어도 안전합니다.
cleanDisabled = false
}
41 changes: 41 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: '3.8'

services:
mysql:
image: mysql:8
container_name: issueDive-mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: issue_dive
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5

app:
build:
context: .
args:
- DB_URL=${SPRING_DATASOURCE_URL}
- DB_USER=${SPRING_DATASOURCE_USERNAME}
- DB_PASSWORD=${SPRING_DATASOURCE_PASSWORD}
container_name: issueDive-app
depends_on:
mysql:
condition: service_healthy
environment:
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
ports:
- "8080:8080"
command: ./gradlew bootRun
tty: true

volumes:
mysql-data:
Empty file modified gradlew
100644 → 100755
Empty file.
Loading
Loading