A backend service built with Spring Boot, designed to manage authentication, task operations, and user interactions.
This repository was initialized and debugged from a broken state. The application now runs successfully after resolving multiple critical issues across configuration, logic, and testing layers.
Level | Task Description |
---|---|
Lv 0 | Fixed application startup errors and configuration issues |
Lv 1 | Restored and re-implemented AuthUserArgumentResolver |
Lv 2 | Refactored service logic for early returns, removed unnecessary else blocks, and moved password validation to DTO |
Lv 3 | Resolved N+1 query problem using @EntityGraph in TodoRepository |
Lv 4 | Corrected and improved test cases across multiple services |
- Fixed multiple startup errors including misconfigured beans and missing dependencies.
- Added
application.yml
with proper JWT key setup.
- Re-implemented
AuthUserArgumentResolver
to correctly inject authenticated user context into controller methods.
- Early Return Logic: Prevented unnecessary password encoding by checking for duplicate emails first.
- Simplified Conditionals: Removed nested
else
blocks for better readability inWeatherClient
. - Validation Shift: Moved password validation logic from service layer to DTO using annotations like
@Size
,@Pattern
and@NotBlank
.
- Replaced JPQL
fetch join
with@EntityGraph
to resolve N+1 query issues inTodoService
.
Fixed broken test cases:
PassEncoderTest
now correctly verifies password matching.ManagerServiceTest
andCommentServiceTest
updated to reflect correct exception handling.- Renamed misleading test method names to match actual behavior.
- Adjusted service logic to ensure tests pass under updated conditions.