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 ·