- React
- TypeScript
- Java (JDK21)
- Spring Boot (3.3.4)
- Spring Security
- JWT (0.11.5)
- PostgreSQL
- MyBatis (3.0.4)
- Redis
- Spring Session Data Redis
- Log4j2 (2.22.1)
- log4j-slf4j2-impl
- Gradle
- Lombok (1.18.30)
- Spring Boot Devtools
- Annotation/Configuration Processors
- UTF-8 encoding
- Java compile release 21
- Spring Boot Starter Test (JUnit Platform)
- Mockito
- Spring Security Test
Final_Project/
├── backend/ # Spring Boot 백엔드 프로젝트
│ ├── build.gradle # Gradle 빌드 설정
│ ├── gradlew # Gradle Wrapper (Linux/Mac)
│ ├── gradlew.bat # Gradle Wrapper (Windows)
│ ├── gradle/
│ │ └── wrapper/
│ │ └── gradle-wrapper.properties
│ └── src/
│ └── main/
│ ├── java/
│ │ └── com/example/finalproject/
│ │ └── FinalProjectApplication.java
│ └── resources/
│ ├── application.yml # Spring Boot 설정
│ └── log4j2.xml # Log4j2 설정
├── frontend/ # React 프론트엔드 프로젝트
│ ├── package.json # React 의존성
│ ├── tsconfig.json # TypeScript 설정
│ ├── public/
│ │ └── index.html
│ └── src/
│ ├── App.tsx
│ ├── index.tsx
│ ├── App.css
│ └── index.css
├── .gitignore
└── README.md
.env 파일을 생성하고 다음 내용을 추가하세요:
# 데이터베이스 설정
DB_USERNAME=postgres
DB_PASSWORD=your_password_here
# Redis 설정
REDIS_PASSWORD=
# JWT 설정
JWT_SECRET=your-super-secret-jwt-key-herePostgreSQL 데이터베이스를 설치하고 final_project 데이터베이스를 생성하세요.
Redis 서버를 설치하고 실행하세요.
cd backend
./gradlew bootRuncd frontend
npm install
npm start- Backend: http://localhost:8080/api
- Frontend: http://localhost:3000
- Postman 다운로드
- 설치 후 실행
Postman에서 새로운 Environment를 생성하고 다음 변수를 설정하세요:
Environment Variables:
- baseUrl: http://localhost:8080/api
- token: (로그인 후 받은 JWT 토큰)
- Collections → New Collection 생성
- Collection 레벨에서 기본 Headers 설정:
Content-Type: application/json Accept: application/json
GET {{baseUrl}}/health
POST {{baseUrl}}/auth/login
Headers:
Content-Type: application/json
Body:
{
"username": "[email protected]",
"password": "password123"
}
GET {{baseUrl}}/users
Headers:
Authorization: Bearer {{token}}
로그인 API의 Tests 탭에 다음 스크립트 추가:
if (pm.response.code === 200) {
const response = pm.response.json();
pm.environment.set("token", response.token);
}- Collection Runner를 사용하여 여러 API를 순차적으로 테스트
- Pre-request Scripts로 공통 로직 처리
- Tests Scripts로 응답 검증 자동화
- Development:
baseUrl: http://localhost:8080/api - Production:
baseUrl: https://your-domain.com/api
- VS Code 확장 마켓플레이스에서 "Thunder Client" 검색
- 설치 후 Ctrl+Shift+P → "Thunder Client: New Request"
- 빠른 API 테스트에 유용