Refactor: Move auth-related files into com.medtrack.auth package (feature-based structure)
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 25/100
- Issue 類型
- 重構
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- java, spring-boot
研究方向
The issue lists nine auth files to move into a com.medtrack.auth package: UserController, UserService, User, UserRepository, LoginRequest, AuthResponse, JwtUtil, JwtAuthFilter and SecurityConfig. It also names HospitalService and DataInitializer as importers to update. Done means the project builds with mvn clean install and the register and login endpoints still respond. The issue describes a MedTrack backend that does not match this repository, so confirm the target code exists before starting.
由索引模型根據 Issue 內容生成。
描述
Currently all backend files are organized layer-wise (controller/, service/, model/, repository/, etc.), mixing all members' code together in the same top-level packages.
This PR moves all Member 1 (Auth & Security) files into a dedicated auth package with its own internal layer structure, for better modularity:
com.medtrack.auth/
├── controller/ → UserController.java
├── service/ → UserService.java
├── model/ → User.java
├── repository/ → UserRepository.java
├── dto/ → LoginRequest.java, AuthResponse.java
├── security/ → JwtUtil.java, JwtAuthFilter.java
└── config/ → SecurityConfig.java
Changes made:
Moved 9 files from com.medtrack.{model,repository,dto,service,controller,security,config} → com.medtrack.auth.*
Updated package declarations in all moved files
Updated internal imports within the auth package
Fixed external imports in files that reference User.java / UserRepository.java / JwtUtil.java / JwtAuthFilter.java / SecurityConfig.java:
HospitalService.java — import com.medtrack.model.User; → import com.medtrack.auth.model.User;
DataInitializer.java — same User import updated
No functional/logic changes — this is a pure package reorganization. No API endpoints, URLs, or request/response formats are affected.
Frontend impact: None. All @RequestMapping / @PostMapping URL paths remain unchanged (/api/user/register, /api/user/login), so AuthService.js and HttpService.js require no changes.
Verification:
Project builds clean (mvn clean install)
All existing endpoints tested (register, login)
No broken imports across other members' files
Note for team: If anyone is currently working on a branch that imports com.medtrack.model.User or other moved classes, please pull latest and update your imports to com.medtrack.auth.* accordingly before merging your own PR, to avoid conflicts.
- 主要語言
- Java
- 星號
- 6
- 分支
- 22
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
harness/ff-java-server-sdk 的其他 Issue
-
難度 5/5 一週以上 新手友好度 18/100
harness/ff-java-server-sdk#216 ·
-
難度 3/5 1-2 天 新手友好度 30/100
harness/ff-java-server-sdk#212 ·
-
難度 3/5 1-2 天 新手友好度 35/100
harness/ff-java-server-sdk#142 ·
查看 harness/ff-java-server-sdk 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
NucleusFramework/Nucleus#1020 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 83/100
ajeetraina/awesome-docker-sbx#839 ·
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
portfolio-performance/portfolio#6459 ·
維護者通常 2 天內回覆
-
Bug
難度 2/5 1-3 小時 新手友好度 75/100
bufbuild/protovalidate-java#564 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 83/100
it-at-m/traegerportal#17 ·