Skip to content

[Setup/#1] 프로젝트 기본 환경 구성 및 도메인 엔티티 설계#2

Merged
Donghwan814 merged 20 commits into
developfrom
Setup/#1
Jul 8, 2026
Merged

[Setup/#1] 프로젝트 기본 환경 구성 및 도메인 엔티티 설계#2
Donghwan814 merged 20 commits into
developfrom
Setup/#1

Conversation

@Donghwan814

Copy link
Copy Markdown
Contributor

연관 Issue

요약

소셜 로그인 구현에 앞서 프로젝트 공통 토대(빌드·설정·DB 연결·보안 기본값)를 구성하고,
ERD 기준 전체 도메인 엔티티를 JPA로 매핑했습니다.

변경 사항

  • application.yml / application-local.yml 환경 설정 및 .env 연동(spring-dotenv)
  • MySQL datasource / JPA 연결 구성
  • GlobalEntity 및 생성·수정 시간 자동 기록 리스너 구현
  • ERD 기준 전체 도메인 엔티티 설계 (user ~ game_field_table, 총 13개)
  • 엔티티 PK 타입 Long 통일 및 enum 매핑 정리
  • SecurityConfig 기본 CORS 설정 추가

범위

포함:

  • 프로젝트 기본 설정 및 DB 연결
  • 공통 엔티티(GlobalEntity) 및 전체 도메인 엔티티 매핑
  • SecurityConfig 기본 CORS 설정

제외:

  • 소셜 로그인(Google/Facebook) OAuth 로직
  • JWT 발급/검증 및 인가 규칙 세분화
  • Service / Repository / Controller 등 비즈니스 로직

스크린샷 / 미리 보기

ERD

image

MySQL 테이블 매핑

image

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR establishes the foundational environment for the project ahead of social-login work: build/config, MySQL + JPA connectivity, baseline Spring Security (CORS/CSRF/stateless session), and the full set of ERD-derived JPA domain entities. It fits as the "Setup" groundwork (closes #1) that later authentication and business-logic PRs will build upon.

Changes:

  • Adds environment configuration (application.yml, application-local.yml, .env.example, .gitignore) for profiles, datasource, JPA, OAuth2 client, JWT, and Swagger.
  • Introduces a shared GlobalEntity @MappedSuperclass with a GlobalEntityListener for automatic created_at/updated_at auditing.
  • Maps 13 domain entities (with supporting enums) and adds a baseline SecurityConfig with CORS.

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/main/resources/application.yml Profiles, OAuth2 client, JPA, JWT, Swagger settings
src/main/resources/application-local.yml Local MySQL datasource, JPA ddl-auto, logging
.env.example / .gitignore Env var template and ignore rule for .env (JWT var names diverge from application.yml)
global/entity/GlobalEntity.java / GlobalEntityListener.java Auditing base class and lifecycle listener
global/config/SecurityConfig.java Stateless security filter chain + CORS source
domain/user/entity/* User entity plus NativeLangauge (misspelled), Role, Status enums
domain/learning_content/* LearningContent entity, ContentType (SYLLABUS wrong word), Difficulty
domain/content_category/* ContentCategory entity and generic Type enum
domain/standard_pronunciation/entity/StandardPronunciation.java Entity with an unused/incorrect JacksonProperties import
domain/{social_account,ranking,pronunciation_attempt,phoneme_score,game_result,game_field_table,feedback,audio_file,wrong_answer}/* Remaining ERD domain entities and enums

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,8 @@
package com.daehanforeigner.capstone.domain.user.entity;

public enum NativeLangauge {
Comment thread .env.example Outdated
Comment on lines +17 to +18
JWT_ACCESS_TOKEN_EXPIRATION=3600000
JWT_REFRESH_TOKEN_EXPIRATION=604800000
@@ -0,0 +1,6 @@
package com.daehanforeigner.capstone.domain.content_category;

public enum Type {
@Donghwan814 Donghwan814 requested a review from Copilot July 8, 2026 05:39
@Donghwan814 Donghwan814 merged commit 19a81c5 into develop Jul 8, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 27 changed files in this pull request and generated 5 comments.

application:
name: capstone
profiles:
active: local

@Enumerated(EnumType.STRING)
@Column(name = "native_language") // 모국어
private NativeLangauge nativeLanguage;
package com.daehanforeigner.capstone.domain.feedback.entity;

import com.daehanforeigner.capstone.domain.pronunciation_attempt.PronunciationAttempt;
import com.daehanforeigner.capstone.domain.user.entity.NativeLangauge;

@Enumerated(EnumType.STRING)
@Column(name = "language") // 피드백 언어
private NativeLangauge language;
@Getter
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "user")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Setup] Spring Boot 프로젝트 기본 환경 구성

2 participants