Skip to content

Commit cc4a067

Browse files
chore: saerok-BE 프로젝트 초기 설정 (Spring Boot + Gradle)
0 parents  commit cc4a067

15 files changed

Lines changed: 627 additions & 0 deletions

File tree

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/gradlew text eol=lf
2+
*.bat text eol=crlf
3+
*.jar binary

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
HELP.md
2+
.gradle
3+
build/
4+
!gradle/wrapper/gradle-wrapper.jar
5+
!**/src/main/**/build/
6+
!**/src/test/**/build/
7+
8+
### STS ###
9+
.apt_generated
10+
.classpath
11+
.factorypath
12+
.project
13+
.settings
14+
.springBeans
15+
.sts4-cache
16+
bin/
17+
!**/src/main/**/bin/
18+
!**/src/test/**/bin/
19+
20+
### IntelliJ IDEA ###
21+
.idea
22+
*.iws
23+
*.iml
24+
*.ipr
25+
out/
26+
!**/src/main/**/out/
27+
!**/src/test/**/out/
28+
29+
### NetBeans ###
30+
/nbproject/private/
31+
/nbbuild/
32+
/dist/
33+
/nbdist/
34+
/.nb-gradle/
35+
36+
### VS Code ###
37+
.vscode/
38+
39+
# 환경 변수 파일은 절대 커밋하지 말 것!
40+
.env

README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# 🌿 Saerok Server
2+
3+
Spring Boot 기반의 백엔드 서버입니다.
4+
5+
---
6+
7+
## 💠 기술 스택
8+
9+
- Java 21
10+
- Spring Boot 3.4.4
11+
- PostgreSQL
12+
- JPA (Hibernate)
13+
- Gradle
14+
- GitHub Actions + AWS EC2 (CI/CD)
15+
16+
---
17+
18+
## ⚙️ 로컬 개발 환경 설정
19+
20+
### 1. GitHub 저장소 클론
21+
22+
```bash
23+
git clone https://github.com/your-id/saerok-BE.git
24+
cd saerok-BE
25+
```
26+
27+
### 2. IntelliJ에서 프로젝트 열기
28+
29+
- IntelliJ 실행 → "Open" → `saerok-BE` 폴더 선택
30+
- 또는 `build.gradle` 파일을 선택하면 "Open as Project" 옵션이 나타나므로 해당 옵션 선택
31+
- Gradle 자동 import가 되지 않을 경우 하단 알림창에서 수동 import 실행
32+
33+
### 3. JDK 설치 및 설정
34+
35+
- JDK 21이 설치되어 있어야 합니다.
36+
- IntelliJ 메뉴에서 `File > Project Structure > Project` 탭으로 이동
37+
- SDK 항목에서 `Download JDK` 선택 → Version: 21, Vendor: Amazon Corretto 21.0.6 선택 후 다운로드 및 설정
38+
39+
### 4. 환경 변수 파일 설정
40+
41+
`.env` 파일을 프로젝트 루트에 생성하고 다음과 같이 작성합니다:
42+
43+
```
44+
DB_URL=jdbc:postgresql://localhost:5432/your_db
45+
DB_USERNAME=your_username
46+
DB_PASSWORD=your_password
47+
```
48+
49+
### 5. 애플리케이션 실행
50+
51+
- `SaerokServerApplication.java` 우클릭 → `Run`
52+
- 또는 `Shift + F10` 단축키로 실행
53+
54+
---
55+
56+
## 🌐 배포 환경 (예정)
57+
58+
- EC2 서버에 `application-dev.yml` 설정을 기반으로 배포 예정
59+
- GitHub Actions를 통해 브랜치 푸시 시 자동 배포 예정
60+
61+
---
62+
63+
## 🚀 브랜치 전략 (GitHub Flow)
64+
65+
- `main`: 운영 브랜치 (운영용 EC2에 배포)
66+
- `develop`: 개발 브랜치 (개발용 EC2에 배포)
67+
- `feat/*`, `fix/*`: 기능 추가 및 버그 수정 브랜치
68+
→ 완료 후 `develop` 브랜치로 Pull Request 생성 및 병합
69+
70+
---
71+
72+
## 🧪 테스트 구성 (예정)
73+
74+
- JUnit 기반 단위 테스트 및 통합 테스트 구성 예정
75+
76+
---
77+
78+
## 📂 프로젝트 디렉터리 구조 (예정)
79+
80+
```
81+
추가 예정
82+
```
83+
84+
---
85+
86+
## 📌 커밋 메시지 컨벤션 (임시)
87+
88+
- `feat`: 기능 추가
89+
- `fix`: 버그 수정
90+
- `chore`: 설정, 환경, 빌드 관련 변경
91+

build.gradle

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
plugins {
2+
id 'java'
3+
id 'org.springframework.boot' version '3.4.4'
4+
id 'io.spring.dependency-management' version '1.1.7'
5+
}
6+
7+
group = 'org.devkor.apu'
8+
version = '0.0.1-SNAPSHOT'
9+
10+
java {
11+
toolchain {
12+
languageVersion = JavaLanguageVersion.of(21)
13+
}
14+
}
15+
16+
configurations {
17+
compileOnly {
18+
extendsFrom annotationProcessor
19+
}
20+
}
21+
22+
repositories {
23+
mavenCentral()
24+
}
25+
26+
dependencies {
27+
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
28+
implementation 'org.springframework.boot:spring-boot-starter-web'
29+
compileOnly 'org.projectlombok:lombok'
30+
developmentOnly 'org.springframework.boot:spring-boot-devtools'
31+
runtimeOnly 'org.postgresql:postgresql'
32+
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
33+
annotationProcessor 'org.projectlombok:lombok'
34+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
35+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
36+
}
37+
38+
tasks.named('test') {
39+
useJUnitPlatform()
40+
}

gradle/wrapper/gradle-wrapper.jar

42.7 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)