Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: "🐛️ Bug"
description: "버그 발견 및 수정/해결"
title: "🐛️[BUG]: "
labels: "🐛bug"
assignees: ''

---

## 📌 버그 설명
<!-- 발생한 버그에 대해 자세히 적어주세요. -->

-

<br/>

## ✅ 수정할 항목

- [ ]
- [ ]

<br/>

## 💬 기타 참고 사항 (선택)
<!-- 기타 참고 사항이 있다면 자유롭게 적어주세요. (관련 커밋, 관련 PR, 관련 링크, 이미지, 화면 캡처, 레퍼런스 자료 등) -->
<!-- 관련 에러 로그, 에러 스택 플레이스, 화면 캡처 등 -->

-
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/chore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "⚙️ Chore"
description: "세팅 및 설정, 빌드, CICD 관련 작업"
title: "⚙️[CHORE]: "
labels: "⚙️chore"
assignees: ''

---

## 📌 작업 개요
<!-- 어떤 작업인지 적어주세요. (예: dependency 업데이트, CI 설정 등) -->

-

<br/>

## ✅ 작업 항목

- [ ]
- [ ]

<br/>

## 💬 기타 참고 사항 (선택)
<!-- 기타 참고 사항이 있다면 자유롭게 적어주세요. (관련 커밋, 관련 PR, 관련 링크, 이미지, 화면 캡처, 레퍼런스 자료 등) -->

-
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "📄 Documentation"
description: "문서화 작업"
title: "📄[DOCS]: "
labels: "📃docs"
assignees: ''

---

## 📌 문서 내용 개요
<!-- 어떤 내용을 문서화하거나 수정할 것인지 적어주세요. -->

-

<br/>

## ✅ 작업 항목

- [ ]
- [ ]

<br/>

## 💬 기타 참고 사항 (선택)
<!-- 기타 참고 사항이 있다면 자유롭게 적어주세요. (관련 커밋, 관련 PR, 관련 링크, 이미지, 화면 캡처, 레퍼런스 자료 등) -->

-
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "✨ Feature"
description: "새로운 기능 개발 및 수정"
title: "✨[Feature]: "
labels: "✨feature"
assignees: ''

---

## 📌 기능 설명
<!-- 어떤 기능을 개발 or 수정하는지 적어주세요. -->

-

<br/>

## ✅ 구현할 기능 목록

- [ ]
- [ ]

<br/>

## 💬 기타 참고 사항 (선택)
<!-- 기타 참고 사항이 있다면 자유롭게 적어주세요. (관련 커밋, 관련 PR, 관련 링크, 이미지, 화면 캡처, 레퍼런스 자료 등) -->

-
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/refactor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "🪄 Refactor"
description: "기능 개선 및 기존 코드 리팩토링"
title: "🪄[REFACTOR]: "
labels: "🪄refactor"
assignees: ''

---

## 📌 리팩토링 설명
<!-- 어떤 코드/로직을 리팩토링할 예정이며, 이유 등을 자세히 적어주세요. -->

-

<br/>

## ✅ 작업 항목

- [ ]
- [ ]

<br/>

## 💬 기타 참고 사항 (선택)
<!-- 기타 참고 사항이 있다면 자유롭게 적어주세요. (관련 커밋, 관련 PR, 관련 링크, 이미지, 화면 캡처, 레퍼런스 자료 등) -->

-
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## 📌 작업 내용 및 특이사항

-

<br/>

## 🌱 관련 이슈
<!-- # 뒤에 이슈 번호를 적어주세요. -->

- close #

<br/>

## 🔍 참고사항(선택)

-

<br/>

## 📚 기타(선택)
<!-- 스크린샷, 이미지 등 -->

-
49 changes: 49 additions & 0 deletions .github/workflows/develop_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: develop pull request Check and Test

on:
pull_request:
branches: [ "develop" ]

jobs:
test:
runs-on: ubuntu-latest
env:
DB_NAME: ${{ secrets.DATABASE_NAME }}
DB_USERNAME: ${{ secrets.DATABASE_USERNAME }}
DB_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}

strategy:
matrix:
java-version: [ 17 ]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'

- name: Run MySQL with Docker
run: |
docker run -d \
--name mysql \
-e MYSQL_ROOT_PASSWORD=$DB_PASSWORD \
-e MYSQL_DATABASE=$DB_NAME \
-p 3306:3306 \
mysql:8.0

- name: Run Redis with Docker
run: |
docker run -d \
--name redis \
-p 6379:6379 \
redis:7.0

- name: Grant Execute Permission for Gradlew
run: chmod +x ./gradlew

- name: Run Gradle Check
run: ./gradlew check
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ out/
### VS Code ###
.vscode/

###
.DS_Store

### ENV
*.env
9 changes: 0 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'

// Flyway (Database Migration Tools)
//implementation 'org.flywaydb:flyway-core'
//implementation 'org.flywaydb:flyway-mysql'

// Validation
implementation 'org.springframework.boot:spring-boot-starter-validation'

Expand All @@ -58,11 +54,6 @@ dependencies {
// Redis
implementation 'org.springframework.boot:spring-boot-starter-data-redis'

// AWS
//implementation 'software.amazon.awssdk:s3:2.20.140' // 최신 버전 확인 후 적용
//implementation 'software.amazon.awssdk:auth:2.20.140' // IAM 인증 관련
//implementation 'software.amazon.awssdk:sts:2.20.140' // STS (IAM Role 인증 필요시)

// Firebase-admin
implementation 'com.google.firebase:firebase-admin:9.2.0'

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/ject/studytrip/StudytripApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ public class StudytripApplication {
public static void main(String[] args) {
SpringApplication.run(StudytripApplication.class, args);
}

}
6 changes: 3 additions & 3 deletions src/main/resources/application-datasource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ spring:

datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/${DB_NAME:}?useSSL=false
username: ${MYSQL_USERNAME:}
password: ${MYSQL_PASSWORD:}
url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:}?useSSL=false&allowPublicKeyRetrieval=true
username: ${DB_USERNAME:root}
password: ${DB_PASSWORD:}
9 changes: 9 additions & 0 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@ spring:
config:
activate:
on-profile: "dev"

jpa:
hibernate:
ddl-auto: update

logging:
level:
org.springframework.orm.jpa: DEBUG
org.springframework.transaction: DEBUG
15 changes: 15 additions & 0 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,18 @@ spring:
activate:
on-profile: "local"

jpa:
hibernate:
ddl-auto: update
show-sql: true
properties:
hibernate:
format_sql: true
dialect: org.hibernate.dialect.MySQL8Dialect
defer-datasource-initialization: true
open-in-view: false

logging:
level:
org.springframework.orm.jpa: DEBUG
org.springframework.transaction: DEBUG
4 changes: 4 additions & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ spring:
config:
activate:
on-profile: "prod"

jpa:
hibernate:
ddl-auto: none
13 changes: 13 additions & 0 deletions src/main/resources/application-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@ spring:
config:
activate:
on-profile: "security"

jwt:
secret: ${JWT_SECRET:}
access-expiration-time: ${JWT_ACCESS_EXPIRATION_TIME:7200}
refresh-expiration-time: ${JWT_REFRESH_EXPIRATION_TIME:604800}

oauth:
kakao:
client-id: ${KAKAO_CLIENT_ID:}
client-secret: ${KAKAO_CLIENT_SECRET:}
redirect-uri: ${KAKAO_REDIRECT_URI:}
token-uri: "https://kauth.kakao.com/oauth/token"
user-info-uri: "https://kapi.kakao.com/v2/user/me"
4 changes: 0 additions & 4 deletions src/main/resources/application-storage.yml

This file was deleted.

15 changes: 13 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
spring:
profiles:
active: ${SPRING_PROFILES_ACTIVE:local}
include:
- datasource
- redis
- storage
- security

springdoc:
default-consumes-media-type: application/json;charset=UTF-8
default-produces-media-type: application/json;charset=UTF-8
swagger-ui:
path: /swagger-ui
disable-swagger-default-url: true
display-request-duration: true
tags-sorter: alpha
operations-sorter: alpha
syntax-highlight:
theme: none
urls-primary-name: StudyTrip API DOCS
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package com.ject.studytrip;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;

@ActiveProfiles("test")
@AutoConfigureTestDatabase(
replace = AutoConfigureTestDatabase.Replace.NONE) // 테스트 시 내장된 인메모리 DB를 사용하지 않는다는 설정
@SpringBootTest
class StudytripApplicationTests {

@Test
void contextLoads() {
System.out.println("🌐 DB_HOST = " + System.getenv("DB_HOST"));
}

}
9 changes: 9 additions & 0 deletions src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@ spring:
config:
activate:
on-profile: "test"

jpa:
hibernate:
ddl-auto: update
show-sql: true
properties:
hibernate:
format_sql: true
dialect: org.hibernate.dialect.MySQL8Dialect