From 28de7da9a634e955a7770e14fcc1e18290a6d8f7 Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 18 May 2026 16:34:34 +0200 Subject: [PATCH] refactor(user): migrate UserController to @RequiredArgsConstructor + final fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../raddatz/familienarchiv/user/UserController.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/org/raddatz/familienarchiv/user/UserController.java b/backend/src/main/java/org/raddatz/familienarchiv/user/UserController.java index 69eba03d..c01517c3 100644 --- a/backend/src/main/java/org/raddatz/familienarchiv/user/UserController.java +++ b/backend/src/main/java/org/raddatz/familienarchiv/user/UserController.java @@ -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 getCurrentUser(Authentication authentication) {