[SpringBoot] final의 의미

hyyyynjn·2021년 3월 26일
0
post-thumbnail
post-custom-banner
@RequiredArgsConstructor
@RestController
public class UserController {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    private final UserService userService;

    @GetMapping("/api/user/{id}")
    public List<UserDataResponseDto> findAllUsers(@PathVariable String id) {
        logger.warn("UserController> findAllUsers> id="+id);
        return userService.findAllUsers(Long.parseLong(id));
    }
}
  • private UserService userService;private final UserService userService;의 차이는 무엇일까?
post-custom-banner

0개의 댓글