[Setup/#1] 프로젝트 기본 환경 구성 및 도메인 엔티티 설계#2
Merged
Merged
Conversation
There was a problem hiding this comment.
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@MappedSuperclasswith aGlobalEntityListenerfor automaticcreated_at/updated_atauditing. - Maps 13 domain entities (with supporting enums) and adds a baseline
SecurityConfigwith 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 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 { | |||
| 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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
연관 Issue
요약
소셜 로그인 구현에 앞서 프로젝트 공통 토대(빌드·설정·DB 연결·보안 기본값)를 구성하고,
ERD 기준 전체 도메인 엔티티를 JPA로 매핑했습니다.
변경 사항
범위
포함:
제외:
스크린샷 / 미리 보기
ERD
MySQL 테이블 매핑