refactor(user): migrate UserController to @RequiredArgsConstructor + final fields
The circular-dependency that originally forced @AllArgsConstructor was removed when changePassword orchestration moved into the controller. No cycle now exists between UserController, UserService, AuthService, or AuditService — final fields and constructor injection are safe again. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,15 +30,15 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/")
|
||||
@AllArgsConstructor
|
||||
@RequiredArgsConstructor
|
||||
public class UserController {
|
||||
private UserService userService;
|
||||
private AuthService authService;
|
||||
private AuditService auditService;
|
||||
private final UserService userService;
|
||||
private final AuthService authService;
|
||||
private final AuditService auditService;
|
||||
|
||||
@GetMapping("users/me")
|
||||
public ResponseEntity<AppUser> getCurrentUser(Authentication authentication) {
|
||||
|
||||
Reference in New Issue
Block a user