diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md
new file mode 100644
index 0000000..8be29bc
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug.md
@@ -0,0 +1,28 @@
+---
+name: "๐๏ธ Bug"
+description: "๋ฒ๊ทธ ๋ฐ๊ฒฌ ๋ฐ ์์ /ํด๊ฒฐ"
+title: "๐๏ธ[BUG]: "
+labels: "๐bug"
+assignees: ''
+
+---
+
+## ๐ ๋ฒ๊ทธ ์ค๋ช
+
+
+-
+
+
+
+## โ
์์ ํ ํญ๋ชฉ
+
+- [ ]
+- [ ]
+
+
+
+## ๐ฌ ๊ธฐํ ์ฐธ๊ณ ์ฌํญ (์ ํ)
+
+
+
+-
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/chore.md b/.github/ISSUE_TEMPLATE/chore.md
new file mode 100644
index 0000000..80b6784
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/chore.md
@@ -0,0 +1,27 @@
+---
+name: "โ๏ธ Chore"
+description: "์ธํ
๋ฐ ์ค์ , ๋น๋, CICD ๊ด๋ จ ์์
"
+title: "โ๏ธ[CHORE]: "
+labels: "โ๏ธchore"
+assignees: ''
+
+---
+
+## ๐ ์์
๊ฐ์
+
+
+-
+
+
+
+## โ
์์
ํญ๋ชฉ
+
+- [ ]
+- [ ]
+
+
+
+## ๐ฌ ๊ธฐํ ์ฐธ๊ณ ์ฌํญ (์ ํ)
+
+
+-
diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md
new file mode 100644
index 0000000..f0339ed
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/documentation.md
@@ -0,0 +1,27 @@
+---
+name: "๐ Documentation"
+description: "๋ฌธ์ํ ์์
"
+title: "๐[DOCS]: "
+labels: "๐docs"
+assignees: ''
+
+---
+
+## ๐ ๋ฌธ์ ๋ด์ฉ ๊ฐ์
+
+
+-
+
+
+
+## โ
์์
ํญ๋ชฉ
+
+- [ ]
+- [ ]
+
+
+
+## ๐ฌ ๊ธฐํ ์ฐธ๊ณ ์ฌํญ (์ ํ)
+
+
+-
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md
new file mode 100644
index 0000000..91bed0e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature.md
@@ -0,0 +1,27 @@
+---
+name: "โจ Feature"
+description: "์๋ก์ด ๊ธฐ๋ฅ ๊ฐ๋ฐ ๋ฐ ์์ "
+title: "โจ[Feature]: "
+labels: "โจfeature"
+assignees: ''
+
+---
+
+## ๐ ๊ธฐ๋ฅ ์ค๋ช
+
+
+-
+
+
+
+## โ
๊ตฌํํ ๊ธฐ๋ฅ ๋ชฉ๋ก
+
+- [ ]
+- [ ]
+
+
+
+## ๐ฌ ๊ธฐํ ์ฐธ๊ณ ์ฌํญ (์ ํ)
+
+
+-
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/refactor.md b/.github/ISSUE_TEMPLATE/refactor.md
new file mode 100644
index 0000000..40e8a4b
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/refactor.md
@@ -0,0 +1,27 @@
+---
+name: "๐ช Refactor"
+description: "๊ธฐ๋ฅ ๊ฐ์ ๋ฐ ๊ธฐ์กด ์ฝ๋ ๋ฆฌํฉํ ๋ง"
+title: "๐ช[REFACTOR]: "
+labels: "๐ชrefactor"
+assignees: ''
+
+---
+
+## ๐ ๋ฆฌํฉํ ๋ง ์ค๋ช
+
+
+-
+
+
+
+## โ
์์
ํญ๋ชฉ
+
+- [ ]
+- [ ]
+
+
+
+## ๐ฌ ๊ธฐํ ์ฐธ๊ณ ์ฌํญ (์ ํ)
+
+
+-
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..5e14901
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,23 @@
+## ๐ ์์
๋ด์ฉ ๋ฐ ํน์ด์ฌํญ
+
+-
+
+
+
+## ๐ฑ ๊ด๋ จ ์ด์
+
+
+- close #
+
+
+
+## ๐ ์ฐธ๊ณ ์ฌํญ(์ ํ)
+
+-
+
+
+
+## ๐ ๊ธฐํ(์ ํ)
+
+
+-
\ No newline at end of file
diff --git a/.github/workflows/develop_pull_request.yml b/.github/workflows/develop_pull_request.yml
new file mode 100644
index 0000000..1cb5ddc
--- /dev/null
+++ b/.github/workflows/develop_pull_request.yml
@@ -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
diff --git a/.gitignore b/.gitignore
index d221371..c93ca88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,5 +36,8 @@ out/
### VS Code ###
.vscode/
+###
+.DS_Store
+
### ENV
*.env
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 15d6eb9..13a8a26 100644
--- a/build.gradle
+++ b/build.gradle
@@ -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'
@@ -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'
diff --git a/src/main/java/com/ject/studytrip/StudytripApplication.java b/src/main/java/com/ject/studytrip/StudytripApplication.java
index 1f5c011..c58013a 100644
--- a/src/main/java/com/ject/studytrip/StudytripApplication.java
+++ b/src/main/java/com/ject/studytrip/StudytripApplication.java
@@ -9,5 +9,4 @@ public class StudytripApplication {
public static void main(String[] args) {
SpringApplication.run(StudytripApplication.class, args);
}
-
}
diff --git a/src/main/resources/application-datasource.yml b/src/main/resources/application-datasource.yml
index 56adcd7..a1ab59a 100644
--- a/src/main/resources/application-datasource.yml
+++ b/src/main/resources/application-datasource.yml
@@ -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:}
\ No newline at end of file
+ url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:}?useSSL=false&allowPublicKeyRetrieval=true
+ username: ${DB_USERNAME:root}
+ password: ${DB_PASSWORD:}
\ No newline at end of file
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index e572e48..ab39ea0 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -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
diff --git a/src/main/resources/application-local.yml b/src/main/resources/application-local.yml
index 4757dd6..f4679f7 100644
--- a/src/main/resources/application-local.yml
+++ b/src/main/resources/application-local.yml
@@ -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
\ No newline at end of file
diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml
index 622c895..940b53c 100644
--- a/src/main/resources/application-prod.yml
+++ b/src/main/resources/application-prod.yml
@@ -2,3 +2,7 @@ spring:
config:
activate:
on-profile: "prod"
+
+ jpa:
+ hibernate:
+ ddl-auto: none
diff --git a/src/main/resources/application-security.yml b/src/main/resources/application-security.yml
index ccab047..91cb1ff 100644
--- a/src/main/resources/application-security.yml
+++ b/src/main/resources/application-security.yml
@@ -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"
\ No newline at end of file
diff --git a/src/main/resources/application-storage.yml b/src/main/resources/application-storage.yml
deleted file mode 100644
index 0182854..0000000
--- a/src/main/resources/application-storage.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-spring:
- config:
- activate:
- on-profile: "storage"
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index a6b501b..47b06ae 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -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
diff --git a/src/test/java/com/ject/studytrip/StudytripApplicationTests.java b/src/test/java/com/ject/studytrip/StudytripApplicationTests.java
index 4e43e9a..4d574f5 100644
--- a/src/test/java/com/ject/studytrip/StudytripApplicationTests.java
+++ b/src/test/java/com/ject/studytrip/StudytripApplicationTests.java
@@ -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"));
}
-
}
diff --git a/src/test/resources/application-test.yml b/src/test/resources/application-test.yml
index c77a121..85d0292 100644
--- a/src/test/resources/application-test.yml
+++ b/src/test/resources/application-test.yml
@@ -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